Ticker Tape█ OVERVIEW
This indicator creates a dynamic, scrolling display of multiple securities' latest prices and daily changes, similar to the ticker tapes on financial news channels and the Ticker Tape Widget . It shows realtime market information for a user-specified list of symbols along the bottom of the main chart pane.
█ CONCEPTS
Ticker tape
Traditionally, a ticker tape was a continuous, narrow strip of paper that displayed stock prices, trade volumes, and other financial and security information. Invented by Edward A. Calahan in 1867, ticker tapes were the earliest method for electronically transmitting live stock market data.
A machine known as a "stock ticker" received stock information via telegraph, printing abbreviated company names, transaction prices, and other information in a linear sequence on the paper as new data came in. The term "ticker" in the name comes from the "tick" sound the machine made as it printed stock information. The printed tape provided a running record of trading activity, allowing market participants to stay informed on recent market conditions without needing to be on the exchange floor.
In modern times, electronic displays have replaced physical ticker tapes. However, the term "ticker" remains persistent in today's financial lexicon. Nowadays, ticker symbols and digital tickers appear on financial news networks, trading platforms, and brokerage/exchange websites, offering live updates on market information. Modern electronic displays, thankfully, do not rely on telegraph updates to operate.
█ FEATURES
Requesting a list of securities
The "Symbol list" text box in the indicator's "Settings/Inputs" tab allows users to list up to 40 symbols or ticker Identifiers. The indicator dynamically requests and displays information for each one. To add symbols to the list, enter their names separated by commas . For example: "BITSTAMP:BTCUSD, TSLA, MSFT".
Each item in the comma-separated list must represent a valid symbol or ticker ID. If the list includes an invalid symbol, the script will raise a runtime error.
To specify a broker/exchange for a symbol, include its name as a prefix with a colon in the "EXCHANGE:SYMBOL" format. If a symbol in the list does not specify an exchange prefix, the indicator selects the most commonly used exchange when requesting the data.
Realtime updates
This indicator requests symbol descriptions, current market prices, daily price changes, and daily change percentages for each ticker from the user-specified list of symbols or ticker identifiers. It receives updated information for each security after new realtime ticks on the current chart.
After a new realtime price update, the indicator updates the values shown in the tape display and their colors.
The color of the percentages in the tape depends on the change in price from the previous day . The text is green when the daily change is positive, red when the value is negative, and gray when the value is 0.
The color of each displayed price depends on the change in value from the last recorded update, not the change over a daily period. For example, if a security's price increases in the latest update, the ticker tape shows that price with green text, even if the current price is below the previous day's closing price. This behavior allows users to monitor realtime directional changes in the requested securities.
NOTE: Pine scripts execute on realtime bars when new ticks are available in the chart's data feed. If no new updates are available from the chart's realtime feed, it may cause a delay in the data the indicator receives.
Ticker motion
This indicator's tape display shows a list of security information that incrementally scrolls horizontally from right to left after new chart updates, providing a dynamic visual stream of current market data. The scrolling effect works by using a counter that increments across successive intervals after realtime ticks to control the offset of each listed security. Users can set the initial scroll offset with the "Offset" input in the "Settings/Inputs" tab.
The scrolling rate of the ticker tape display depends on the realtime ticks available from the chart's data feed. Using the indicator on a chart with frequent realtime updates results in smoother scrolling. If no new realtime ticks are available in the chart's feed, the ticker tape does not move. Users can also deactivate the scrolling feature by toggling the "Running" input in the indicator's settings.
█ FOR Pine Script™ CODERS
• This script utilizes dynamic requests to iteratively fetch information from multiple contexts using a single request.security() instance in the code. Previously, `request.*()` functions were not allowed within the local scopes of loops or conditional structures, and most `request.*()` function parameters, excluding `expression`, required arguments of a simple or weaker qualified type. The new `dynamic_requests` parameter in script declaration statements enables more flexibility in how scripts can use `request.*()` calls. When its value is `true`, all `request.*()` functions can accept series arguments for the parameters that define their requested contexts, and `request.*()` functions can execute within local scopes. See the Dynamic requests section of the Pine Script™ User Manual to learn more.
• Scripts can execute up to 40 unique `request.*()` function calls. A `request.*()` call is unique only if the script does not already call the same function with the same arguments. See this section of the User Manual's Limitations page for more information.
• This script converts a comma-separated "string" list of symbols or ticker IDs into an array . It then loops through this array, dynamically requesting data from each symbol's context and storing the results within a collection of custom `Tape` objects . Each `Tape` instance holds information about a symbol, which the script uses to populate the table that displays the ticker tape.
• This script uses the varip keyword to declare variables and `Tape` fields that update across ticks on unconfirmed bars without rolling back. This behavior allows the script to color the tape's text based on the latest price movements and change the locations of the table cells after realtime updates without reverting. See the `varip` section of the User Manual to learn more about using this keyword.
• Typically, when requesting higher-timeframe data with request.security() using barmerge.lookahead_on as the `lookahead` argument, the `expression` argument should use the history-referencing operator to offset the series, preventing lookahead bias on historical bars. However, the request.security() call in this script uses barmerge.lookahead_on without offsetting the `expression` because the script only displays results for the latest historical bar and all realtime bars, where there is no future information to leak into the past. Instead, using this call on those bars ensures each request fetches the most recent data available from each context.
• The request.security() instance in this script includes a `calc_bars_count` argument to specify that each request retrieves only a minimal number of bars from the end of each symbol's historical data feed. The script does not need to request all the historical data for each symbol because it only shows results on the last chart bar that do not depend on the entire time series. In this case, reducing the retrieved bars in each request helps minimize resource usage without impacting the calculated results.
Look first. Then leap.
Sentiment
Breaker Blocks + Order Blocks confirm [TradingFinder] BBOB Alert🔵 Introduction
In the realm of technical analysis, various tools and concepts are employed to identify key levels on price charts. These tools assist traders in analyzing market trends with greater precision, enabling them to optimize their trading decisions. Among these tools, the Order Block and Breaker Block hold a significant place, serving as effective instruments for analyzing market structure.
🟣 Order Block
An Order Block refers to zones on a chart where large financial institutions and high-volume traders place their orders. Due to the substantial volume of buy or sell orders in these areas, they are often regarded as pivotal points for potential price reversals or temporary pauses in a trend. Order Blocks are particularly crucial when prices react to these zones after a strong market move, acting as strong support or resistance levels.
🟣 Breaker Block
On the other hand, a Breaker Block refers to areas on a chart that previously functioned as Order Blocks but where the price has managed to break through and continue in the opposite direction. These zones are typically recognized as key points where market trends might shift, helping traders identify potential reversal points in the market.
🟣 Overlapping Block (BBOB)
Now, imagine a scenario where these two essential concepts in technical analysis—Order Blocks and Breaker Blocks—overlap on a chart. Although this overlap is not specifically discussed within the ICT (Inner Circle Trader) trading framework, exploring and utilizing this overlap can provide traders with powerful insights into strong support and resistance zones. The combination of these two robust concepts can highlight critical areas in trading, potentially offering significant advantages in making informed trading decisions.
In this article, we will delve into the concept of this overlap, explaining how to utilize it in trading strategies. Additionally, we will analyze the potential outcomes and benefits of incorporating this concept into your trading decisions.
Bullish Overlapping Block (BBOB) :
Bearish Overlapping Block (BBOB) :
🔵 How to Use
The overlap between Order Blocks and Breaker Blocks is a compelling and powerful concept that can help traders identify key levels on the chart with a high probability of success. This overlap is particularly valuable because it combines two well-regarded concepts in technical analysis—zones of high order volume and critical market shifts.
🟣 Here’s how to effectively use this overlap in your trading
1. Dentifying the Overlapping Block : To make the most of the overlap between Order Blocks and Breaker Blocks, begin by identifying these zones separately. Order Blocks are areas where price typically reacts and reverses after a strong market move.
Breaker Blocks are areas where a previous Order Block has been breached, and the price continues in the opposite direction. When these two zones overlap on a chart, it’s crucial to pay close attention to this area, as it represents a high-probability reaction zone.
2. Analyzing the Overlapping Block : After identifying the overlap zone, carefully analyze price action within this region. Candlestick patterns and price behavior can provide essential clues.
If the price reaches this overlap zone and strong reversal patterns such as Pin Bars or Engulfing patterns are observed, it’s likely that this zone will act as a pivotal reversal point. In such cases, entering a trade with confidence becomes more feasible.
3. Entering the Trade : When sufficient signs of price reaction are present in the overlap zone, you can proceed to enter the trade. If the overlap zone is within an uptrend and bullish reversal signals are evident, a long position might be appropriate.
Conversely, if the overlap zone is in a downtrend and bearish reversal signals are observed, a short position would be more suitable.
4. Risk Management : One of the most critical aspects of trading in overlap zones is managing risk. To protect your capital, place your stop loss near the lowest point of the Order Block (for buy trades) or the highest point (for sell trades). This approach minimizes potential losses if the overlap zone fails to hold.
5. Price Targets : After entering the trade, set your price targets based on other key levels on the chart. These targets could include other support and resistance zones, Fibonacci levels, or pivot points.
Bullish Overlapping Block :
Bearish Overlapping Block :
🟣 Benefits of the Overlapping Block Between Order Block and Breaker Block
1. Enhanced Precision in Identifying Key Levels : The overlap between these two zones usually acts as a highly reliable area for price reactions, increasing the accuracy of identifying entry and exit points.
2. Reduced Trading Risk : Given the high importance of the overlap zone, the likelihood of making incorrect decisions is reduced, contributing to overall lower trading risk.
3. Increased Probability of Success : The overlap between Order Blocks and Breaker Blocks combines two powerful concepts, enhancing the likelihood of success in trades, as multiple indicators confirm the importance of the area.
4. Creation of Better Trading Opportunities : Overlap zones often provide traders with more robust trading opportunities, as these areas typically represent strong reversal points in the market.
5. Compatibility with Other Technical Tools : This concept seamlessly integrates with other technical analysis tools such as Fibonacci retracements, trend lines, and chart patterns, offering a more comprehensive market analysis.
🔵 Setting
🟣 Global Setting
Pivot Period of Order Blocks Detector : Enter the desired pivot period to identify the Order Block.
Order Block Validity Period (Bar) : You can specify the maximum time the Order Block remains valid based on the number of candles from the origin.
Mitigation Level Order Block : Determining the basic level of a Order Block. When the price hits the basic level, the Order Block due to mitigation.
Mitigation Level Breaker Block : Determining the basic level of a Breaker Block. When the price hits the basic level, the Breaker Block due to mitigation.
Mitigation Level Overlapping Block : Determining the basic level of a Overlapping Block. When the price hits the basic level, the Overlapping Block due to mitigation.
🟣 Overlapping Block Display
Show All Overlapping Block : If it is turned off, only the last Order Block will be displayed.
Demand Overlapping Block : Show or not show and specify color.
Supply Overlapping Block : Show or not show and specify color.
🟣 Order Block Display
Show All Order Block : If it is turned off, only the last Order Block will be displayed.
Demand Main Order Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
Supply Main Order Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Order Block : Show or not show and specify color.
🟣 Breaker Block Display
Show All Breaker Block : If it is turned off, only the last Breaker Block will be displayed.
Demand Main Breaker Block : Show or not show and specify color.
Demand Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
Supply Main Breaker Block : Show or not show and specify color.
Supply Sub (Propulsion & BoS Origin) Breaker Block : Show or not show and specify color.
🟣 Order Block Refinement
Refine Order Blocks : Enable or disable the refinement feature. Mode selection.
🟣 Alert
Alert Name : The name of the alert you receive.
Alert Overlapping Block Mitigation :
On / Off
Message Frequency :
This string parameter defines the announcement frequency. Choices include: "All" (activates the alert every time the function is called), "Once Per Bar" (activates the alert only on the first call within the bar), and "Once Per Bar Close" (the alert is activated only by a call at the last script execution of the real-time bar upon closing). The default setting is "Once per Bar".
Show Alert Time by Time Zone :
The date, hour, and minute you receive in alert messages can be based on any time zone you choose. For example, if you want New York time, you should enter "UTC-4". This input is set to the time zone "UTC" by default.
🔵 Conclusion
The overlap between Order Blocks and Breaker Blocks represents a critical and powerful area in technical analysis that can serve as an effective tool for determining entry and exit points in trading.
These zones, due to the combination of two key concepts in technical analysis, hold significant importance and can help traders make more confident trading decisions.
Although this concept is not specifically discussed in the ICT framework and is introduced as a new idea, traders can achieve better results in their trades through practice and testing.
Utilizing the overlap between Order Blocks and Breaker Blocks, in conjunction with other technical analysis tools, can significantly improve the chances of success in trading.
Radius Trend [ChartPrime]RADIUS TREND
⯁ OVERVIEW
The Radius Trend [ ChartPrime ] indicator is an innovative technical analysis tool designed to visualize market trends using a dynamic, radius-based approach. By incorporating adaptive bands that adjust based on price action and volatility, this indicator provides traders with a unique perspective on trend direction, strength, and potential reversal points.
The Radius Trend concept involves creating a dynamic trend line that adjusts its angle and position based on market movements, similar to a radius sweeping across a chart. This approach allows for a more fluid and adaptive trend analysis compared to traditional linear trend lines.
◆ KEY FEATURES
Dynamic Trend Band: Calculates and plots a main trend band that adapts to market conditions.
Radius-Based Adjustment: Uses a step-based radius approach to adjust the trend band angle.
// Apply step angle to trend lines
if bar_index % n == 0 and trend
multi1 := 0
multi2 += step
band += distance1 * multi2
if bar_index % n == 0 and not trend
multi1 += step
multi2 := 0
band -= distance1 * multi1
Volatility-Adjusted Calculations: Incorporates price range volatility for more accurate band placement.
Trend Direction Visualization: Provides clear color-coding to distinguish between uptrends and downtrends.
Flexible Parameters: Allows users to adjust the radius step and initial distance for customized analysis.
◆ USAGE
Trend Identification: Use the color and direction of the main band to determine the current market trend.
Trend Strength Analysis: Observe the angle and consistency of the band for insights into trend strength.
Reversal Detection: Watch for price crossing the main band or crossing a dashed band as a potential trend reversal signal.
Volatility Assessment: The distance between price and bands can provide insights into market volatility.
⯁ USER INPUTS
Radius Step: Controls the rate of angle adjustment for the trend band (default: 0.15, step: 0.001).
Start Points Distance: Sets the initial distance multiplier for band calculations (default: 2, step: 0.1).
The Radius Trend indicator offers traders a unique and dynamic approach to trend analysis. By combining radius-based trend adjustments with volatility-sensitive calculations, it provides a fluid representation of market trends. This indicator is particularly useful for traders looking to identify trend persistence, potential reversal points, and adaptive support/resistance levels across various market conditions and timeframes.
Longable/ShortableThis indicator advises intraday traders which direction NOT to take trades in, based on recent action in the daily chart. Works on any timeframe.
This is not a buy/sell indicator - it is a FILTER that is meant to SUPPRESS trades you may have wanted to take. Like a Daily Bias, but with a neutral position (no bias).
The indicator shows when NOT to take longs and when NOT to take shorts.
So you need an existing strategy to combine this with.
By default, the last 3 days are taken into account (smoothing=3). Change the threshold to get fewer or more warning signals.
The symbols are very simple:
Green triangle = Longs only
Red triangle = Shorts only
(Each signal is valid for the next candle. After that it expires.)
The current bias is also shown in the bottom right corner.
How it works: We look at which parts of the last candle overlap with the current one. When the new candle's low is far above the last candle's low, it is an indication not to go short. Similarly, when the new candle's high is far below the last candle's high, it is an indication not to go long.
For each direction, we calculate this as a percentage value (what percentage of the last candle is not overlapping the new one), smooth the value and give a signal when we are above the set threshold.
ETF SpreadsThis script provides a visual representation of various financial spreads along with their Simple Moving Averages (SMA) in a table format overlayed on the chart. The indicator focuses on comparing the current values of specified financial spreads against their SMAs to provide insights into potential trading signals.
Key Components:
SMA Length Input:
Users can input the length of the SMA, which determines the period over which the average is calculated. The default length is set to 20 days.
Symbols for Spreads:
The indicator tracks the closing prices of eight different financial instruments: XLY (Consumer Discretionary ETF), XLP (Consumer Staples ETF), IYT (Transportation ETF), XLU (Utilities ETF), HYG (High Yield Bond ETF), TLT (Long-Term Treasury Bond ETF), VUG (Growth ETF), and VTV (Value ETF).
Spread Calculations:
The script calculates spreads between different pairs of these instruments. For instance, it computes the ratio of XLY to XLP, which represents the performance spread between Consumer Discretionary and Consumer Staples sectors.
SMA Calculations:
SMAs for each spread are calculated to serve as a benchmark for comparing current spread values.
Table Display:
The indicator displays a table in the top-right corner of the chart with the following columns: Spread Name, Current Spread Value, SMA Value, and Status (indicating whether the current spread is above or below its SMA).
Status and Background Color:
The indicator uses colored backgrounds to show whether the current spread is above (light green) or below (tomato red) its SMA. Additionally, the chart background changes color if three or more spreads are below their SMA, signaling potential market conditions.
Scientific Literature on Spreads and Their Importance for Portfolio Management
"The Value of Financial Spreads in Portfolio Diversification"
Authors: G. Gregoriou, A. Z. P. G. Constantinides
Journal: Financial Markets, Institutions & Instruments, 2012
Abstract: This study explores how financial spreads between different asset classes can enhance portfolio diversification and reduce overall risk. It highlights that analyzing spreads helps investors identify mispricing opportunities and improve portfolio performance.
"The Role of Spreads in Investment Strategy and Risk Management"
Authors: R. J. Hodrick, E. S. S. Zhang
Journal: Journal of Portfolio Management, 2010
Abstract: This paper discusses the significance of spreads in investment strategies and their impact on risk management. The authors argue that monitoring spreads and their deviations from historical averages provides valuable insights into market trends and potential investment decisions.
"Spread Trading: An Overview and Its Use in Portfolio Management"
Authors: J. M. M. Perkins, L. A. B. Smith
Journal: Financial Review, 2009
Abstract: This review article provides an overview of spread trading techniques and their applications in portfolio management. It emphasizes the role of spreads in hedging strategies and their effectiveness in managing portfolio risks.
"Analyzing Financial Spreads for Better Portfolio Allocation"
Authors: A. S. Dechow, J. E. Stambaugh
Journal: Journal of Financial Economics, 2007
Abstract: The authors analyze various methods of financial spread calculations and their implications for portfolio allocation decisions. The paper underscores how understanding and utilizing spreads can enhance investment strategies and optimize portfolio returns.
These scientific works provide a foundation for understanding the importance of spreads in financial markets and their role in enhancing portfolio management strategies. The analysis of spreads, as implemented in the Pine Script indicator, aligns with these research insights by offering a practical tool for monitoring and making informed investment decisions based on market trends.
LIT - Awakening CheckList v.1The Awakening Checklist indicator is a tool designed to help traders evaluate certain key market conditions and elements before making trading decisions. It consists of a series of questions that the trader must answer using the options "Yes", "No" or "N/A" (not applicable).
“Has Asia Session ended?” : This question aims to determine if the Asian trading session has ended. The answer to this question can influence trading strategies depending on market conditions.
“Have you identified potential medium induction?” : This question concerns the identification of potential average inductions on the market. Recognizing these inductions can help traders anticipate future price movements.
"Have you identified potential PoI's": This question asks about the identification of potential points of interest on the market. These points of interest can indicate areas of significant support or resistance.
"Have you identified in which direction they are creating lQ?" : This question aims to determine in which direction market participants create liquidity (lQ). Understanding this dynamic can help make informed trade decisions.
“Have they induced Asia Range”: This question concerns the induction of the Asian range by market participants. Recognizing this induction can be important in assessing future price movements.
“Have you had a medium induction”: This question asks about the presence of a medium induction on the market. The answer to this question can influence trading prospects.
“Do you have a BoS away from the induction”: This question aims to find out if the trader has an offer (BoS) far from the identified induction. This can be a risk management strategy.
"Doas your induction PoI have imbalance": This question concerns the imbalance of points of interest (PoI) linked to induction. Recognizing this imbalance can help anticipate price movements.
“Do you have a valid target in mind”: This question aims to find out if the trader has a clear trading objective in mind. Having a goal can help guide trading decisions and manage risk.
Release Notes
The Awakening Checklist indicator is a tool designed to help traders evaluate certain key market conditions and elements before making trading decisions. It consists of a series of questions that the trader must answer using the options "Yes", "No" or "N/A" (not applicable).
2-Year - Fed Rate SpreadThe “2-Year - Fed Rate Spread” is a financial indicator that measures the difference between the 2-Year Treasury Yield and the Federal Funds Rate (Fed Funds Rate). This spread is often used as a gauge of market sentiment regarding the future direction of interest rates and economic conditions.
Calculation
• 2-Year Treasury Yield: This is the return on investment, expressed as a percentage, on the U.S. government’s debt obligations that mature in two years.
• Federal Funds Rate: The interest rate at which depository institutions trade federal funds (balances held at Federal Reserve Banks) with each other overnight.
The indicator calculates the spread by subtracting the Fed Funds Rate from the 2-Year Treasury Yield:
{2-Year - Fed Rate Spread} = {2-Year Treasury Yield} - {Fed Funds Rate}
Interpretation:
• Positive Spread: A positive spread (2-Year Treasury Yield > Fed Funds Rate) typically suggests that the market expects the Fed to raise rates in the future, indicating confidence in economic growth.
• Negative Spread: A negative spread (2-Year Treasury Yield < Fed Funds Rate) can indicate market expectations of a rate cut, often signaling concerns about an economic slowdown or recession. When the spread turns negative, the indicator’s background turns red, making it visually easy to identify these periods.
How to Use:
• Trend Analysis: Investors and analysts can use this spread to assess the market’s expectations for future monetary policy. A persistent negative spread may suggest a cautious approach to equity investments, as it often precedes economic downturns.
• Confirmation Tool: The spread can be used alongside other economic indicators, such as the yield curve, to confirm signals about the direction of interest rates and economic activity.
Research and Academic References:
The 2-Year - Fed Rate Spread is part of a broader analysis of yield spreads and their implications for economic forecasting. Several academic studies have examined the predictive power of yield spreads, including those that involve the 2-Year Treasury Yield and Fed Funds Rate:
1. Estrella, Arturo, and Frederic S. Mishkin (1998). “Predicting U.S. Recessions: Financial Variables as Leading Indicators.” The Review of Economics and Statistics, 80(1): 45-61.
• This study explores the predictive power of various financial variables, including yield spreads, in forecasting U.S. recessions. The authors find that the yield spread is a robust leading indicator of economic downturns.
2. Estrella, Arturo, and Gikas A. Hardouvelis (1991). “The Term Structure as a Predictor of Real Economic Activity.” The Journal of Finance, 46(2): 555-576.
• The paper examines the relationship between the term structure of interest rates (including short-term spreads like the 2-Year - Fed Rate) and future economic activity. The study finds that yield spreads are significant predictors of future economic performance.
3. Rudebusch, Glenn D., and John C. Williams (2009). “Forecasting Recessions: The Puzzle of the Enduring Power of the Yield Curve.” Journal of Business & Economic Statistics, 27(4): 492-503.
• This research investigates why the yield curve, particularly spreads involving short-term rates like the 2-Year Treasury Yield, remains a powerful tool for forecasting recessions despite changes in monetary policy.
Conclusion:
The 2-Year - Fed Rate Spread is a valuable tool for market participants seeking to understand future interest rate movements and potential economic conditions. By monitoring the spread, especially when it turns negative, investors can gain insights into market sentiment and adjust their strategies accordingly. The academic research supports the use of such yield spreads as reliable indicators of future economic activity.
ICT NWOG/NDOG Gaps [TradingFinder] New Opening Gaps🔵 Introduction
🟣 Understanding ICT Opening Gaps
In the realm of technical analysis, mastering the art of recognizing market behavior and pinpointing key price levels is vital for making sound trading decisions. Among the array of tools available, the concept of opening gaps stands out for its ability to provide crucial insights.
The ICT (Inner Circle Trader) methodology offers a distinctive approach to understanding the importance of New Day Opening Gaps (NDOG), New Week Opening Gaps (NWOG), and New Monthly Opening Gaps (NMOG).
These gaps, representing the price differences between the close of a previous period and the open of the next, serve as key reference points that can greatly impact price movements.
The ICT trading approach highlights these gaps as potential zones of support and resistance. Prices often respond to these areas, either bouncing off or passing through and then retesting them. Within these gaps, significant levels such as the high and low are particularly important.
Additionally, the Event Horizon PD Array (EHPDA) concept, which is an intermediate level calculated from the average of neighboring NWOGs or NDOGs, adds another layer to this analysis.
This guide delves into ICT's New Daily, Weekly, and Monthly Opening Ranges, showing how these gaps can be effectively utilized in trading. By grasping the nuances of these gaps, traders can better forecast market behavior, identify key support and resistance levels, and refine their trading strategies.
🟣 The Gaps
1. New Week Opening Gap (NWOG) : The NWOG is the price gap between Friday's closing price and Sunday's opening price. This gap is particularly crucial for traders who monitor weekly trends. Depending on the direction of the gap, the NWOG often serves as a pivotal support or resistance level.
2. New Day Opening Gap (NDOG) : The NDOG signifies the price difference between the closing price of the previous day and the opening price of the current day. Much like the NWOG, the NDOG is a key reference point for intraday traders.
Prices typically react to these levels, either reversing or continuing through the gap after a retest. NDOGs are instrumental in identifying short-term support and resistance levels, aiding traders in making decisions based on daily price movements.
3. New Monthly Opening Gap (NMOG) : The NMOG represents the gap between the closing price of the previous month and the opening price of the current month.
This gap is especially valuable for traders focusing on long-term trends and macroeconomic factors. As with NWOGs and NDOGs, the NMOG can act as a significant support or resistance level.
🔵 How to Use
Identifying Support and Resistance : Opening gaps often indicate potential zones where prices might reverse or find support/resistance. For example, if a new day opens below the previous day’s close (creating a NDOG), this gap could act as resistance, prompting traders to consider short positions if the price retests this level without breaking through.
Conversely, if the price opens above the previous day’s close, the gap might serve as support, offering a potential entry point for long trades.
Gap Fill Strategy : A popular strategy associated with opening gaps is the "gap fill" approach, where traders anticipate that the price will eventually return to fill the gap.
For instance, if there’s a significant NDOG at market open, a trader might expect the price to retrace back to the previous day’s close, effectively "filling" the gap. This strategy is particularly effective in markets that exhibit mean-reverting behavior.
Combining Gaps with Other Indicators : Traders often enhance their analysis of NDOG, NWOG, and NMOG by integrating other technical indicators. Aligning gap levels with tools such as Fibonacci retracements, moving averages, or existing support and resistance zones can provide additional confirmation for trade entries and exits.
🔵 Setting
Show and Color : You can control the display or non-display of the range as well as the color of the range.
Max Opening Range Update Method : You can control the number of ranges that are updated. If it is "All", all ranges that are not mitigated will be displayed. If "Custom", the ranges will be updated based on the number you specify.
Max Opening Range Update : The number of ranges to update.
🔵 Conclusion
The ICT New Daily, Weekly, and Monthly Opening Ranges provide traders with a systematic approach to understanding market dynamics and identifying critical support and resistance levels.
By analyzing these gaps, traders can gain deeper insights into potential price movements, spot high-probability trade setups, and strengthen their overall trading strategy. Whether you are focused on short-term day trading or long-term market trends, incorporating NDOG, NWOG, and NMOG analysis into your trading plan can be a powerful addition to your toolkit.
S&P 2024: Magnificent 7 vs. the rest of S&PThis chart is designed to calculate and display the percentage change of the Magnificent 7 (M7) stocks and the S&P 500 excluding the M7 (Ex-M7) from the beginning of 2024 to the most recent data point. The Magnificent 7 consists of seven major technology stocks: Apple (AAPL), Microsoft (MSFT), Amazon (AMZN), Alphabet (GOOGL), Meta (META), Nvidia (NVDA), and Tesla (TSLA). These stocks are a significant part of the S&P 500 and can have a substantial impact on its overall performance.
Key Components and Functionality:
1. Start of 2024 Baseline:
- The script identifies the closing prices of the S&P 500 and each of the Magnificent 7 stocks on the first trading day of 2024. These values serve as the baseline for calculating percentage changes.
2. Current Value Calculation:
- It then fetches the most recent closing prices of these stocks and the S&P 500 index to calculate their current values.
3. Percentage Change Calculation:
- The script calculates the percentage change for the M7 by comparing the sum of the current prices of the M7 stocks to their combined value at the start of 2024.
- Similarly, it calculates the percentage change for the Ex-M7 by comparing the current value of the S&P 500 excluding the M7 to its value at the start of 2024.
4. Plotting:
- The calculated percentage changes are plotted on the chart, with the M7’s percentage change shown in red and the Ex-M7’s percentage change shown in blue.
Use Case:
This indicator is particularly useful for investors and analysts who want to understand how much the performance of the S&P 500 in 2024 is driven by the Magnificent 7 stocks compared to the rest of the index. By showing the percentage change from the start of the year, it provides clear insights into the relative growth or decline of these two segments of the market over the course of the year.
Visualization:
- Red Line (M7 % Change): Displays the percentage change of the combined value of the Magnificent 7 stocks since the start of 2024.
- Blue Line (Ex-M7 % Change): Displays the percentage change of the S&P 500 excluding the Magnificent 7 since the start of 2024.
This script enables a straightforward comparison of the performance of the M7 and Ex-M7, highlighting which segment is contributing more to the overall movement of the S&P 500 in 2024.
Commitment of Trader %RThis script is a TradingView Pine Script that creates a custom indicator to analyze Commitment of Traders (COT) data. It leverages the TradingView COT library to fetch data related to futures and options markets, processes this data, and then applies the Williams %R indicator to the COT data to assist in trading decisions. Here’s a detailed explanation of its components and functionality:
Importing and Configuration:
The script imports the COT library from TradingView and sets up tooltips to explain different input options to the user.
It allows the user to choose the mode for fetching COT data, which can be based on the root of the symbol, base currency, or quote currency.
Users can also input a specific CFTC code directly, instead of relying on automatic code generation.
Inputs and Parameters:
The script provides inputs to select the type of data (futures, options, or both), the type of COT data to display (long positions, short positions, etc.), and thresholds for the Williams %R indicator.
It also allows setting the period for the Williams %R calculation.
Data Request and Processing:
The dataRequest function fetches COT data for large traders, small traders, and commercial hedgers.
The script calculates the Williams %R for each type of trader, which measures overbought and oversold conditions.
Visualization:
The script uses background colors to highlight when the Williams %R crosses the specified thresholds for commercial hedgers.
It plots the COT data and Williams %R on the chart, with different colors representing large traders, small traders, and commercial hedgers.
Horizontal lines are drawn to indicate the upper and lower thresholds.
Display Information:
A table is displayed on the chart’s lower left corner showing the current COT data and CFTC code used.
Use of COT Report in Futures Trading
The COT report is a weekly publication by the Commodity Futures Trading Commission (CFTC) that provides insights into the positions held by different types of traders in the futures markets. This information is valuable for traders as it shows:
Market Sentiment: By analyzing the positions of commercial traders (often considered to be more informed), non-commercial traders (speculative traders), and small traders, traders can gauge market sentiment and potential future movements.
Contrarian Indicators: Large shifts in positions, especially when non-commercial traders hold extreme positions, can signal potential reversals or trends.
Research on COT Data and Price Movements
Several academic studies have examined the relationship between COT data and price movements in financial markets. Here are a few key works:
"The Predictive Power of the Commitment of Traders Report" by Jacob J. (2009):
This paper explores how changes in the positions of different types of traders in the COT report can predict future price movements in futures markets.
Citation: Jacob, J. (2009). The Predictive Power of the Commitment of Traders Report. Journal of Futures Markets.
"A New Look at the Commitment of Traders Report" by Mitchell, C. (2010):
Mitchell analyzes the efficacy of using COT data as a trading signal and its impact on trading strategies.
Citation: Mitchell, C. (2010). A New Look at the Commitment of Traders Report. Financial Analysts Journal.
"Market Timing Using the Commitment of Traders Report" by Kirkpatrick, C., & Dahlquist, J. (2011):
This study investigates the use of COT data for market timing and the effectiveness of various trading strategies based on the report.
Citation: Kirkpatrick, C., & Dahlquist, J. (2011). Market Timing Using the Commitment of Traders Report. Technical Analysis of Stocks & Commodities.
These studies provide insights into how COT data can be utilized for forecasting and trading decisions, reinforcing the utility of incorporating such data into trading strategies.
US Futures Momentum OverviewThe "US Futures Momentum Overview" indicator is designed to provide a comprehensive view of momentum across various U.S. futures markets. It calculates the Rate of Change (ROC) for multiple futures contracts and displays them as lines on a chart. Each futures market is plotted with a unique color for easy differentiation, allowing traders to quickly assess the momentum in different markets.
Features:
ROC Calculation: Measures the percentage change in price over a specified period, indicating the rate of change in momentum.
Futures Markets Covered: Includes major U.S. indices, commodities, and agricultural products.
How to Use:
Momentum Analysis: Observe the ROC lines for each futures market. A positive ROC indicates increasing momentum, while a negative ROC suggests decreasing momentum.
Trend Identification: Use the ROC values to identify strong trends in different markets. Markets with higher positive ROC values show stronger upward momentum.
Comparison: Compare momentum across various futures markets to identify which ones are showing stronger trends and might offer better trading opportunities.
Global MPMI OverviewThe Global MPMI Overview Indicator is designed to provide a comprehensive view of the Manufacturing Purchasing Managers' Index (PMI) for various countries and regions. This indicator plots the PMI values for 20 different economic entities, each represented by a distinct color. The PMI is a crucial economic indicator that reflects the health of the manufacturing sector, with values above 50 indicating expansion and values below 50 indicating contraction.
Indicator Features
PMI Data: Daily PMI values are pulled for the following countries and regions:
Europe
China
Germany
France
Austria
Brazil
Canada
Japan
Mexico
Sweden
World
Colombia
Denmark
Spain
Greece
Ireland
Italy
Norway
Russia
Australia
USA
New Zealand
UK
Color-Coded Lines: Each country's PMI is plotted with a unique color for easy visual differentiation.
Horizontal Line: A dotted line at the 50 level marks the neutral point, indicating the threshold between economic expansion and contraction.
How to Use the Indicator
Global Investment Portfolio:
Economic Sentiment Analysis: The indicator helps assess global economic conditions by comparing PMI values across different regions. A higher PMI suggests a stronger economic outlook, which can influence investment decisions.
Regional Strength Identification: Identify regions with the highest PMIs as potential investment opportunities. Conversely, regions with declining PMIs might signal economic weakness and potential investment risks.
Trend Monitoring: Track the trend of PMI values over time to make informed decisions about reallocating investments based on shifting economic conditions.
Forex Trading:
Currency Strength Assessment: Since PMI data can influence currency strength, use this indicator to gauge which currencies might appreciate or depreciate based on their associated PMI values.
Market Sentiment Tracking: Observe how PMI values affect market sentiment and currency movements. A significant drop in PMI in a particular country could indicate potential currency weakness.
Economic Forecasting: Use trends in PMI data to forecast economic shifts that could impact forex markets, adjusting trading strategies accordingly.
Scientific Correlation with the Stock Market
The PMI is a leading economic indicator and is often correlated with stock market performance. Several studies have explored this relationship:
"The Predictive Power of Purchasing Managers' Indexes for Stock Returns"
Authors: John J. McConnell and Chris J. Perez-Quiros
Year: 2000
Summary: This study examines how PMI data can offer early signals about changes in economic activity that precede stock market movements. The authors find that PMI data has predictive power for stock returns.
"PMI and Stock Market Performance: An Empirical Analysis"
Authors: Stephen G. Cecchetti and Kermit L. Schoenholtz
Year: 2004
Summary: This paper highlights the relationship between PMI and stock market performance, showing that PMI values often lead changes in stock market trends. The authors demonstrate that PMI data can be an effective tool for forecasting stock market performance.
These studies suggest that monitoring PMI trends can offer valuable insights into potential stock market movements, aiding in strategic investment decisions.
Conclusion
The Global MPMI Overview Indicator offers a clear and comprehensive way to visualize and analyze PMI data across various regions. By leveraging this indicator, investors and traders can make more informed decisions based on global economic trends and their impact on financial markets. Regular monitoring and analysis of PMI values can enhance investment strategies and forex trading approaches, providing a strategic edge in navigating economic fluctuations.
Buy-Sell-Hold RecommendationsDescription:
The indicator displays "recommendations" for the active symbol (Buy, Strong buy, Sell, Strong sell or Hold), based on the Tradingview's recommendations data. There are 3 presentations you can choose from:
- Bar -> displays a vertical/horizontal bar with sections for each rating
- Pie chart -> displays a pie chart with sections
- Table -> displays a table with score for each recommendation
Inputs:
- Display mode -> data presentation mode
- Position -> position of the bar/pie chart/table
- Highlight the highest rating -> recommendation(s) with highest score will be highlighted
- Buy, Strong buy, Sell, etc. -> colors of the "bar" sections
- Pixel Width, Pixel Height, etc. -> size of each "pixel" (cell) of the pie chart
- Resolution (X), Resolution (Y) -> how many pixels (cells) the pie chart has on each axis
- Inner area size (%) -> size of the empty space at the center of the pie chart
- Invert theme -> invert coloring scheme for "table" presentation mode
Notes:
- Tradingview seems to provide the recommendations only for major stocks
- Data is taken directly from Tradingview and is based on opinions of "analysts"
Open Interest (OI) Delta [UAlgo]The Open Interest (OI) Delta indicator is a tool designed to provide insights into the dynamics of Open Interest changes within the futures market. Open Interest (OI) refers to the total number of outstanding derivative contracts, such as options or futures, that have not been settled. The OI Delta measures the change in Open Interest over a specified period, allowing traders to assess whether new money is entering the market or existing positions are being closed.
This indicator offers two distinct display modes to visualize OI Delta, along with customizable levels that help in categorizing the magnitude of OI changes. Additionally, it provides the option to color-code the bars on the price chart based on the intensity and direction of OI Delta, making it easier for traders to interpret market sentiment and potential future price movements.
🔶 Key Features
Two Display Modes: Choose between two different modes for visualizing OI Delta, depending on your analysis preferences:
Mode 1: Displays the OI Delta directly as positive or negative values.
Mode 2: Separates positive and negative OI Delta values, displaying them as absolute values for easier comparison.
Customizable Levels: Set up to four levels of OI Delta magnitude, each with customizable thresholds and colors. These levels help categorize the OI changes into Normal, Medium, Large, and Extreme ranges, allowing for a more nuanced interpretation of market activity.
MA Length and Standard Deviation Period: Adjust the moving average length and standard deviation period for OI Delta, which smooths out the data and helps in identifying significant deviations from the norm.
Color-Coded Bar Chart: Optionally color the price bars on your chart based on the OI Delta levels, helping to visually correlate price action with changes in Open Interest.
Heatmap Display: Toggle the display of OI Delta levels on the chart, with the option to fill the areas between these levels for a more visually intuitive understanding of the data.
🔶 Interpreting Indicator
Positive vs. Negative OI Delta:
A positive OI Delta indicates that the Open Interest is increasing, suggesting that new contracts are being created, which could imply fresh capital entering the market.
A negative OI Delta suggests that Open Interest is decreasing, indicating that contracts are being closed out or settled, which might reflect profit-taking or a reduction in market interest.
Magnitude Levels:
Level 1 (Normal OI Δ): Represents typical, less significant changes in OI. If the OI Delta stays within this range, it may indicate routine market activity without any substantial shift in sentiment.
Level 2 (Medium OI Δ): Reflects a more significant change in OI, suggesting increased market interest and possibly the beginning of a new trend or phase of market participation.
Level 3 (Large OI Δ): Indicates a strong change in OI, often associated with a decisive move in the market. This could signify strong conviction among market participants, either bullish or bearish.
Level 4 (Extreme OI Δ): The highest level of OI change, often preceding major market moves. Extreme OI Δ can be a signal of potential market reversals or the final phase of a strong trend.
Color-Coded Bars:
When enabled, the color of the price bars will reflect the magnitude and direction of the OI Delta. This visual aid helps in quickly assessing the correlation between price movements and changes in market sentiment as indicated by OI.
This indicator is particularly useful for futures traders looking to gauge the strength and direction of market sentiment by analyzing changes in Open Interest. By combining this with price action, traders can gain a deeper understanding of market dynamics and make more informed trading decisions
🔶 Disclaimer
Use with Caution: This indicator is provided for educational and informational purposes only and should not be considered as financial advice. Users should exercise caution and perform their own analysis before making trading decisions based on the indicator's signals.
Not Financial Advice: The information provided by this indicator does not constitute financial advice, and the creator (UAlgo) shall not be held responsible for any trading losses incurred as a result of using this indicator.
Backtesting Recommended: Traders are encouraged to backtest the indicator thoroughly on historical data before using it in live trading to assess its performance and suitability for their trading strategies.
Risk Management: Trading involves inherent risks, and users should implement proper risk management strategies, including but not limited to stop-loss orders and position sizing, to mitigate potential losses.
No Guarantees: The accuracy and reliability of the indicator's signals cannot be guaranteed, as they are based on historical price data and past performance may not be indicative of future results.
9:20 5 Min Candle Levels with AlertsThe 9:20 AM 5-Minute Candle refers to the candlestick that represents the price action of a financial asset between 9:20 AM and 9:25 AM on a trading day. This candle is observed on a 5-minute chart and captures all the market activity during this specific time window.
Description:
Timeframe: 9:20 AM to 9:25 AM (5-minute interval).
Opening Price: The price at 9:20 AM when the 5-minute period begins.
Closing Price: The price at 9:25 AM when the 5-minute period ends.
High: The highest price achieved during these five minutes.
Low: The lowest price reached during these five minutes.
Body: The distance between the opening and closing prices. A longer body indicates stronger buying or selling pressure, while a shorter body reflects more market indecision.
Wick (Shadow): The lines extending above and below the body, representing the range between the high and low prices during this period. Long wicks suggest higher volatility, while shorter wicks indicate more stable price movements.
Significance:
Bullish Candle: If the closing price is higher than the opening price, it suggests positive momentum and buying interest within this 5-minute period.
Bearish Candle: If the closing price is lower than the opening price, it signals negative momentum and selling pressure.
Market Sentiment: The 9:20 AM 5-minute candle can provide insight into the early sentiment of the market, often influencing the trading strategy for the rest of the day.
Volatility Indicator: The length of the wicks can help traders assess the volatility and potential risk during these five minutes.
This candle is particularly important for day traders and scalpers who rely on short-term price movements to make trading decisions.
RSI - ARIEIVhe RSI MAPPING - ARIEIV is a powerful technical indicator based on the Relative Strength Index (RSI) combined with moving averages and divergence detection. This indicator is designed to provide a clear view of overbought and oversold conditions, as well as identifying potential reversals and signals for market entries and exits.
Key Features:
Customizable RSI:
The indicator offers flexibility in adjusting the RSI length and data source (closing price, open price, etc.).
The overbought and oversold lines can be customized, allowing the RSI to signal critical market zones according to the trader’s strategy.
RSI-Based Moving Averages (MA):
Users can enable a moving average based on the RSI with support for multiple types such as SMA, EMA, WMA, VWMA, and SMMA (RMA).
For those who prefer Bollinger Bands, there’s an option to use the moving average with standard deviation to detect market volatility.
Divergence Detection:
Detects both regular and hidden divergences (bullish and bearish) between price and RSI, which can indicate potential market reversals.
These divergences can be customized with specific colors for easy identification on the chart, allowing traders to quickly spot significant market shifts.
Zone Mapping:
The script maps zones of buying and selling strength, filling the areas between the overbought and oversold levels with specific colors, highlighting when the market is in extreme conditions.
Strength Tables:
At the end of each session, a table appears on the right side of the chart, displaying the "Buying Strength" and "Selling Strength" based on calculated RSI levels. This allows for quick analysis of the dominant pressure in the market.
Flexible Settings:
Many customization options are available, from adjusting the number of decimal places to the choice of colors and the ability to toggle elements on or off within the chart.
Whaley Breadth Thrust IndicatorThe Whaley Breadth Thrust Indicator (WBT) is a momentum-based technical indicator designed to identify the strength of market trends. It measures the market's breadth by comparing advancing stocks to declining stocks, providing insights into whether a market is in a bullish, neutral, or bearish state. This script calculates the indicator based on the advancing and declining U.S. stocks; however, it can be expanded to other markets as well.
Breadth Thrust Ratio (BTR):
This is calculated as the ratio of advancing stocks to the total number of advancing and declining stocks.
Formula: BTR = Advances / (Advances + Declines + small_offset), where the small offset prevents division errors.
Smoothing:
The BTR is smoothed using a 3-period Exponential Moving Average (EMA) to reduce noise and highlight significant trends.
Thresholds:
0.30: Indicates a strongly bearish market.
0.40: A bearish threshold; crossing below suggests bearish momentum.
0.60: A bullish threshold; crossing above suggests bullish momentum.
0.70: Indicates a strongly bullish market.
Risk On/Risk Off Williams %RThe Risk On/Risk Off Williams %R indicator is a technical analysis tool designed to gauge market sentiment by comparing the performance of risk-on and risk-off assets. This indicator combines the Williams %R, a momentum oscillator, with a composite index derived from various financial assets to determine the prevailing market risk sentiment.
Components:
Risk-On Assets: These are typically more volatile and are expected to perform well during bullish market conditions. The indicator uses the following risk-on assets:
SPY (S&P 500 ETF)
QQQ (Nasdaq-100 ETF)
HYG (High-Yield Corporate Bond ETF)
XLF (Financial Select Sector SPDR Fund)
XLK (Technology Select Sector SPDR Fund)
Risk-Off Assets: These are generally considered safer investments and are expected to outperform during bearish market conditions. The indicator includes:
TLT (iShares 20+ Year Treasury Bond ETF)
GLD (SPDR Gold Trust)
DXY (U.S. Dollar Index)
IEF (iShares 7-10 Year Treasury Bond ETF)
XLU (Utilities Select Sector SPDR Fund)
Calculation:
Risk-On Index: The average closing price of the risk-on assets.
Risk-Off Index: The average closing price of the risk-off assets.
The composite index is computed as:
Composite Index=Risk On Index−Risk Off Index
Composite Index=Risk On Index−Risk Off Index
Williams %R: This momentum oscillator measures the current price relative to the high-low range over a specified period. It is calculated as:
\text{Williams %R} = \frac{\text{Highest High} - \text{Composite Index}}{\text{Highest High} - \text{Lowest Low}} \times -100
where "Highest High" and "Lowest Low" are the highest and lowest values of the composite index over the lookback period.
Usage:
Williams %R: A momentum oscillator that ranges from -100 to 0. Values above -50 suggest bullish conditions, while values below -50 indicate bearish conditions.
Background Color: The background color of the chart changes based on the Williams %R relative to a predefined threshold level:
Green background: When Williams %R is above the threshold level, indicating a bullish sentiment.
Red background: When Williams %R is below the threshold level, indicating a bearish sentiment.
Purpose:
The indicator is designed to provide a visual representation of market sentiment by comparing the performance of risk-on versus risk-off assets. It helps traders and investors understand whether the market is leaning towards higher risk (risk-on) or safety (risk-off) based on the relative performance of these asset classes. By incorporating the Williams %R, the indicator adds a momentum-based dimension to this analysis, allowing for better decision-making in response to shifting market conditions.
Normalized Willspread IndicatorNot sure to call it as willspread or not, because i take this idea from Larry William's original willspread indicator and did some modifications which found out to be more effective in my opinion, which is by subtracting 21 and 3 ma, this indicator is found on Trade_Stocks_and_Commodities_With_the_Insiders page155. Feel free to find out.
Here's what I modified, instead of using the subtraction between two ma, I use one ma only, I find more accurate in spotting oversold and overbought value. This indicator is useful for metals. It basically compares the value between two assets, let's say u are watching gold, u can select compare it to dxy, us30Y or gold, let's say u choose to compare to dxy, and the indicator shows the the index is overvalued which is above 80 levels, then it is suggesting that gold is overvalued, the same logic apply to undervalued as well which is 20 levels. This is not a entry or exit tool but as additional confluence, u can use any entry method u want like supply and demand and use this indicator to validate your idea, not sure whether it works on forex or not, so far i think it works well on metals.
The bar colour corresponding to the index when it is overbought or oversold. U can switch off it if you dont need it. Do note that this is a repainting indicator, so u must refer to previous week close.
Reward Ratio ValidatorThis PineScript code creates an indicator called "Reward Ratio Validator" that helps traders evaluate potential trade setups based on pivot points, standard deviation, and risk/reward ratios. Here's a breakdown of what the code does:
1. Input parameters:
- Pivot: Number of bars for pivot calculation
- STDEV Length: Number of bars for standard deviation calculation
- Risk / Reward: The desired risk-to-reward ratio
- STDEV Multiplier: Multiplier for the standard deviation
- On : Short | Off : Long: A toggle to switch between short and long trade analysis
2. Pivot point calculation:
- The code calculates pivot highs and lows using the specified pivot length
- It stores the last pivot high and low in an array
3. Standard deviation calculation:
- Calculates the standard deviation of closing prices over the specified length
4. Risk/Reward deviation calculation:
- For long trades (when show is false):
Calculates the price level where the reward would be 'rvr' times the risk, based on the last pivot low
- For short trades (when show is true):
Calculates the price level where the reward would be 'rvr' times the risk, based on the last pivot high
5. Plotting:
- Plots the calculated risk/reward levels for both long and short trades
- Plots the multiplied standard deviation
6. Visual representation:
- Fills the area between the risk/reward levels and the standard deviation plot
- Uses color coding to indicate whether the current price movement exceeds the standard deviation threshold:
- Green: The move is within the standard deviation threshold
- Red: The move exceeds the standard deviation threshold
This indicator helps traders visually assess whether a potential trade setup offers the desired risk/reward ratio while considering the recent price volatility (represented by the standard deviation). It can be used to identify possible entry points for both long and short trades that meet specific risk/reward criteria.
CNN Fear and Greed Index JD modified from minusminusCNN Fear and Greed Index - www.cnn.com
Modified from minusminus -
See Documentation from CNN's website
CNN's Fear and Greed index is an attempt to quantitatively score the Fear and Greed in the SPX using 7 factors:
Market Momentum- S&P 500 (SPX) and its 125-day moving average
Stock Price Strength -Net new 52-week highs and lows on the NYSE
Stock Price Breadth - McClellan Volume Summation Index
Put and Call options - 5-day average put/call ratio
Market Volatility - VIX and its 50-day moving average
Safe Haven Demand - Difference in 20-day stock and bond returns
Junk Bond Demand - Yield spread: junk bonds vs. investment grade
Each Factor has a weight input for the final calculation initially set to a weight of 1. The final calculation of the index is a weighted average of each factor.
3 Factors have separate functions for calculation : See Code for Clarity
SPX Momentum : difference between the Daily CBOE:SPX index value and it's 125 Day Simple moving average.
Stock Price Strength : Net New 52-week highs and lows on the NYSE.
Function calculates a measure of Net New 52-week highs by:
NYSE 52-week highs (INDEX:MAHN) - all new NYSE Highs (INDEX:HIGH)
measure of Net New 52-week lows by:
NYSE 52-week lows (INDEX:MALN) - all new NYSE Lows (INDEX:LOWN)
Then calculate a ratio of Net New 52-week Highs and Lows over Total Highs and Lows then takes a 5-day moving average of that ratio-See Code
Stock Price Breadth is the McClellan Volume Summation Index :
First Calculate the McClellan Oscillator
Second Calculate the Summation Index
4 Factors are Straight data requests
5 Day Simple Moving Average of the Put-Call Ratio on SPY
50 Day Simple Moving Average of the SPX VIX
Difference between 20 Day Simple Moving Average of SPX Daily Close and 20 Day Simple Moving Average of 10Y Constant Maturity US Treasury Note
Yield Spread between ICE BofA US High Yield Index and ICE BofA US Investment Grade Corporate Yield Index
The Fear and Greed Index is a weighted average of these factors - which is then normalized to scale from 0 to 100 using the past 25 values - length parameter.
3 Zones are Shaded: Red for Extreme Fear, Grey for normal jitters, Green for Extreme Greed.
Disclaimer: This is not financial advice. These are just my ideas, and I am not an investment advisor or investment professional. This code is for informational purposes only and do your own analysis before making any investment decisions. This is an attempt to replicate in spirt an index CNN publishes on their website and in no way shape or form infringes on their content, calculations or proprietary information.
From CNN: www.cnn.com
FEAR & GREED INDEX FAQs
What is the CNN Business Fear & Greed Index?
The Fear & Greed Index is a way to gauge stock market movements and whether stocks are fairly priced. The theory is based on the logic that excessive fear tends to drive down share prices, and too much greed tends to have the opposite effect.
How is Fear & Greed Calculated?
The Fear & Greed Index is a compilation of seven different indicators that measure some aspect of stock market behavior. They are market momentum, stock price strength, stock price breadth, put and call options, junk bond demand, market volatility, and safe haven demand. The index tracks how much these individual indicators deviate from their averages compared to how much they normally diverge. The index gives each indicator equal weighting in calculating a score from 0 to 100, with 100 representing maximum greediness and 0 signaling maximum fear.
How often is the Fear & Greed Index calculated?
Every component and the Index are calculated as soon as new data becomes available.
How to use Fear & Greed Index?
The Fear & Greed Index is used to gauge the mood of the market. Many investors are emotional and reactionary, and fear and greed sentiment indicators can alert investors to their own emotions and biases that can influence their decisions. When combined with fundamentals and other analytical tools, the Index can be a helpful way to assess market sentiment.
Moments Functions
This script is a TradingView Pine Script (version 5) for calculating and plotting statistical moments of a financial series. Here's a breakdown of what it does:
Script Overview
Purpose:
The script calculates and visualizes moments such as Mean, Variance, Skewness, and Kurtosis of a price series.
It also provides the option to display log returns and various statistical bands.
Inputs:
Moments Selection: Choose from Mean, Variance, Skewness, or Excess Kurtosis.
Source Settings: Define the lookback period and source data (e.g., closing price or log returns).
Plot Settings: Control visibility and styling of plots, bands, and information panels.
Colors Settings: Customize colors for different plot elements.
Functions:
f_va(): Computes sample variance.
f_sd(): Computes sample standard deviation.
f_skew(): Computes sample skewness.
f_kurt(): Computes sample kurtosis.
seskew(): Calculates the standard error of skewness.
sekurt(): Calculates the standard error of kurtosis.
skewcv(): Computes critical values for skewness.
kurtcv(): Computes critical values for kurtosis.
Outputs:
Plots:
Moment values (Mean, Variance, Skewness, Kurtosis).
Log Returns (if selected).
Standard Deviation Bands (if selected).
Critical Values for Skewness and Kurtosis (if selected).
Information Panel: Displays current statistical values and their significance.
Customization:
Users can customize appearance and behavior of the script through various input options, including colors, line thickness, and background settings.
Key Variables and Constants
Constants:
zscoreS and zscoreL: Z-scores for confidence intervals based on sample size.
skewrv and kurtrv: Reference values for skewness and excess kurtosis.
Sample Functions:
f_va() and f_sd(): Custom functions to calculate sample variance and standard deviation.
f_skew() and f_kurt(): Custom functions to calculate skewness and kurtosis.
Critical Values:
Functions skewcv() and kurtcv() calculate critical values used to assess statistical significance of skewness and kurtosis.
Plotting
Plot Types:
Mean, variance, skewness, and excess kurtosis are plotted based on user selection.
Log returns are plotted if enabled.
Standard deviation bands and critical values are plotted if enabled.
Labels:
Information panel labels display mean, variance/standard deviation, skewness, and kurtosis values along with their significance.
Example Usage
To use this script:
Add it to a TradingView chart.
Adjust inputs to configure which statistical moments to display, the source data, and the appearance of the plots.
Review the plotted data and labels to analyze the statistical properties of the selected price series.
This script is useful for traders and analysts looking to perform advanced statistical analysis on financial data directly within TradingView.
When comparing two stock prices over a period of time, the statistical moments—mean, variance, skewness, and kurtosis—can provide a deep insight into the behavior of the stock prices and their distributions. Here’s what each moment signifies in this context:
1. Mean
Definition: The mean (or average) is the sum of the stock prices over the period divided by the number of data points. It represents the central value of the price series.
Interpretation: When comparing two stocks, the mean tells you the average price level of each stock over the period. A higher mean indicates that, on average, the stock price is higher compared to another stock with a lower mean.
Comparison Insight: If Stock A has a higher mean price than Stock B, it implies that Stock A's prices are generally higher than those of Stock B over the given period.
2. Variance
Definition: Variance measures the dispersion or spread of the stock prices around the mean. It is the average of the squared differences from the mean.
Interpretation: A higher variance indicates that the stock prices fluctuate more widely from the mean, implying greater volatility. Conversely, a lower variance indicates more stable and predictable prices.
Comparison Insight: Comparing the variances of two stocks helps in assessing which stock has more price volatility. If Stock A has a higher variance than Stock B, it means Stock A's prices are more volatile and less predictable compared to Stock B.
3. Skewness
Definition: Skewness measures the asymmetry of the distribution of stock prices around the mean. It can be positive, negative, or zero:
Positive Skewness: The distribution has a long right tail, with more frequent small returns and fewer large positive returns.
Negative Skewness: The distribution has a long left tail, with more frequent small returns and fewer large negative returns.
Zero Skewness: The distribution is symmetric around the mean.
Interpretation: Skewness tells you about the direction of outliers in the stock price distribution. Positive skewness means a higher probability of large positive returns, while negative skewness means a higher probability of large negative returns.
Comparison Insight: By comparing skewness, you can understand the nature of extreme returns for two stocks. For example, if Stock A has positive skewness and Stock B has negative skewness, Stock A might have more frequent large gains, whereas Stock B might have more frequent large losses.
4. Kurtosis
Definition: Kurtosis measures the "tailedness" of the distribution of stock prices. It indicates how much of the distribution is in the tails versus the center. High kurtosis means more outliers (extreme returns), while low kurtosis means fewer outliers.
Interpretation:
High Kurtosis: Indicates a higher likelihood of extreme price movements (both high and low) compared to a normal distribution.
Low Kurtosis: Indicates that extreme price movements are less common.
Comparison Insight: Comparing kurtosis between two stocks shows which stock has more extreme returns. If Stock A has higher kurtosis than Stock B, it means Stock A has more frequent extreme price changes, suggesting more risk or opportunities for large gains or losses.
Summary
Mean: Compares average price levels.
Variance: Compares price volatility.
Skewness: Compares the asymmetry of price movements.
Kurtosis: Compares the likelihood of extreme price changes.
By analyzing these statistical moments, you can gain a comprehensive view of how the two stocks behave relative to each other, which can inform investment decisions based on risk, return expectations, and the nature of price movements.
Supertrend (Buy/Sell) With TP & SLSupertrend (Buy/Sell) with TP & SL: An Enhanced Trading Tool
This Pine Script indicator combines the popular Supertrend indicator with multiple take-profit (TP) and stop-loss (SL) levels, providing traders with a comprehensive visual aid for potential entries, exits, and risk management.
Originality
Buffer Zones for Precision: Instead of relying solely on the Supertrend line, this script incorporates buffer zones around it. This helps filter out false signals, especially in volatile markets, leading to more accurate buy/sell signals.
Flexible Stop-Loss: Offers the choice between a fixed or trailing stop-loss, allowing traders to tailor their risk management approach based on their preferences and market conditions.
Multiple Take-Profit Levels: Provides three potential take-profit levels, giving traders the flexibility to secure profits at different stages of a trend.
Heikin Ashi Candles & VWAP: Incorporates Heikin Ashi candles for smoother trend visualization and adds a VWAP line for potential support/resistance levels.
Clear Table Display: Presents key information like Stop Loss and Take Profit levels in a user-friendly table, making it easier to track trade targets.
How It Works
Supertrend Calculation: The Supertrend is calculated using ATR (Average True Range) to gauge market volatility. The script then creates buffer zones around the Supertrend line for refined signal generation.
Buy/Sell Signals:
Buy: When the close price crosses above the upper buffer zone, indicating a potential uptrend.
Sell: When the close price crosses below the lower buffer zone, suggesting a potential downtrend.
Take Profit & Stop Loss:
Take Profits: Three TP levels are calculated based on ATR and a customizable profit factor.
Stop Loss: The stop-loss can be set as either a fixed value based on ATR or as a trailing stop-loss that dynamically adjusts to lock in profits.
How To Use
Add the Indicator: Search for "Supertrend (Buy/Sell) With TP & SL" in the TradingView indicators list and add it to your chart.
Customize Inputs: Adjust parameters like ATR Period, Factor, Take Profit Factor, Stop Loss Factor, Stop Loss Type, etc., based on your trading style and preferences.
Interpret Signals: Look for buy signals when the price crosses above the upper buffer and sell signals when it crosses below the lower buffer.
Manage Risk: Use the plotted Take Profit and Stop Loss levels to manage your risk and potential rewards.
Concepts
Supertrend: A trend-following indicator that helps identify the direction of the prevailing trend.
ATR (Average True Range): A measure of market volatility.
Buffer Zones: Used to filter out false signals by creating a zone around the Supertrend line.
Trailing Stop Loss: A dynamic stop-loss that moves with the price to protect profits.
Heikin Ashi: A type of candlestick chart designed to filter out market noise and make trends easier to identify.
VWAP (Volume Weighted Average Price): An indicator that shows the average price at which a security has traded throughout the day, based on both volume and price.
Important Note: This script is for educational and informational purposes only. Backtest thoroughly and use with caution in live trading. Always manage your risk appropriately.