Realtime Divergence for Any Indicator - By John BartleThe main purpose of this script is to show historical and real-time divergences for any oscillating indicator. The secondary purpose is to give the user a lot of precise control over identifying divergences and determining what they are. This is an improved version of my other script which is similarly called "Realtime Divergence for Any Indicator"
There are four types of divergences that are offered:
Bull divergence
Hidden bull divergence
Bear divergence
Hidden Bear divergence
There are three types of potential(real-time) divergences which include:
1) Without right side bars for rightside pivots. Plus without waiting for the rightside pivot bar to complete
2) Without right side bars for rightside pivots. Plus with waiting for the rightside pivot bar to complete
3) With right side bars for rightside pivots. Plus without waiting for the rightside pivot right-most bar to complete
A definite divergence occurs when all specified bars are accounted for and fully formed.
Potential divergences use dashed lines and definite(historical) divergences use solid lines.
In addition to several other categories of settings to filter out unwanted divergences or manipulate the search process, this script also offers Alerts. Remember that alerts must not only be set within this scripts settings but also your "Alerts" panel on your right. It's strange but BOTH must be set for alerts to work...
Other interesting Things To Know:
1)I actually don't trade and so I have no need of a paid account. Unpaid accounts don't have the playback feature so I haven't really tested this script out very well. Sorry. Just let me know if something seems off and IF I have time I'll try to fix it.
2)Keep in mind that Pinescript limits the number of lines that can be shown at one time. This means that if your settings allow for a large number of divergence lines they will be removed from the leftward side of your chart but appear in the rightward side.
3) The time and the values for the price or oscillator are not the same things as each other nor are they physical things with physical space. This means that slopes of lines using the time as X and value as Y can not have definite angles. Consequently, under the setting "DIVERGENCES: SLOPE ANGLE EXCLUSION" YOU have to decide what slope equals what angle by using the setting called "Normalization Factor".
4) Remember that some individual settings apply to both the oscillator and price chart. This means that even if the setting's conditions are fulfilled in one they may not be fulfilled in the other.
5) Under the category "DIVERGENCES: INTERSECTION ALLOWANCE", if you set the "Measurement Type" to Relative Percentage then FYI any single given length will equate to an increasingly smaller percentage the further away from zero it is. Because of this, I think "Reletive Percentage" is probably only useful for price charts or oscillators with big values. Maybe >200 is OK ?
Errors:
1) If you get the error mentioning that the script must complete execution within X amount of time, this is because this is a big script and sometimes takes longer than your service plan's allotted time limit. You can just disable some of the settings to reduce the scripts amount of work and time. The biggest time savers will be to disable some lines and labels
2) If you get an error saying the script accessed a negative index(e.g. ) then try temporarily increasing the "Add More Array Elements" setting to 100-200. Sometimes it fixes the problem.
3) You may sometimes temporarily get an error that reads: "Pine cannot determine the referencing length of a series. Try using max_bars_back in the study or strategy function".
If this happens there are several things that you can do:
3A) Create a copy of my script. Then edit the section of code that looks like this ")//, max_bars_back = INSERT_YOUR_QUANTITY_HERE)" and transform it to look like this new code ", max_bars_back = INSERT_YOUR_QUANTITY_HERE)" then repeatedly try replacing "INSERT_YOUR_QUANTITY_HERE" with an increasingly larger number greater than 244 but less than 5000.
This method will increase your system resources and could cause other problems. Try changing the code back after a few hours and see if all is well again. It is a Pinescript limitation issue and happens when certain functions or variables don't get used at least once within the first 244 bars.
3B) Adjust your settings to hopefully find a divergence within the first 244 bars. If one is found then the problematic variables or functions should get used and the Pinescript 244 bar limitation should be temporarily resolved.
3C) Wait for X number of new bars to occur. If a divergence is eventually found within the first 244 bars that should solve the issue.
Tips:
1) If the amount that a setting changes value is undesirable for each time you click it then you can change that amount in the code. To do that, you'll need your own copy of my script. To make your own copy just click on "create a working copy" in the brown colored strip area above the code. Then within approximately the first 108 lines find the title of the setting you want to change. Then look to it's right to find the parameter called "step =". Change what the step equals to whatever you want. FYI, you can hover your mouse over the blue colored code and a popup will tell you what parameters(i.e. settings) that function(e.g. "input.int()") has available.
Cari dalam skrip untuk "chart"
Bitcoin CME Gap TrackerCME Bitcoin Futures Gaps: What Are They and Why Are They Important?
Gaps are breaks between price candles on charts, illustrating the intervals between the closing price of the previous period and the opening price of the next. For Bitcoin on CME, these gaps arise due to the particular workings of this market.
Bitcoin and other cryptocurrencies trade 24/7 without breaks. However, CME Bitcoin Futures, like many other financial instruments on traditional exchanges, have weekends and trading pauses. When the Bitcoin market continues to move during weekends or CME closures, and then CME opens on the subsequent trading day, a price disparity can occur, perceived as a gap.
Several studies suggest that in most cases (approximately 70% and more), the market reverts to "close" these gaps. This phenomenon is observed because large liquidity is concentrated at these gap points. There are many unfilled orders in gap zones, placed at specific prices. When the price reaches these levels, it can swiftly react to this "clustering" of orders, potentially leading to the gap's closure.
Therefore, CME Bitcoin Futures gaps not only reflect crucial psychological moments in the market but can also serve as potential entry or exit points, considering the high liquidity in these zones.
Technical Description:
The script is designed to identify gaps in the Bitcoin Futures chart on CME. It automatically detects gaps that appear on Mondays (since CME is closed on weekends) and are larger than the user-specified percentage.
Key Features:
Identification of the weekday to detect gaps that arose on Monday.
Calculation of positive and negative gaps by comparing the highs and lows of the previous candles with the current ones.
Graphical representation of the gaps using lines and labels on the chart.
User Guide:
Add this script to your TradingView chart.
You can adjust the "Show gaps larger than %" parameter to determine the minimum gap size of interest.
Gaps will be automatically displayed on your chart with lines and labels.
Bullish and Bearish Candlestick Patterns StrategyThe strategy is a combination of candlestick pattern analysis and Fibonacci retracement levels to identify potential buy and sell signals in the market. Here's how the strategy works and how you can trade accordingly:
Candlestick Pattern Analysis:
The strategy looks for specific bullish and bearish candlestick patterns to identify potential trend reversals or continuations. The bullish patterns include:
Bullish Engulfing: This pattern occurs when a bullish candle fully engulfs the previous bearish candle.
Hammer: It is a single candlestick pattern with a small body and a long lower wick, indicating a potential bullish reversal.
Morning Star: This pattern consists of three candles, with the middle one being a small-bodied candle that gaps down and the other two being bullish candles.
The bearish patterns include:
Bearish Engulfing: Similar to the bullish engulfing, but this time, a bearish candle fully engulfs the previous bullish candle.
Shooting Star: A single candlestick pattern with a small body and a long upper wick, suggesting a potential bearish reversal.
Evening Star: This pattern is the opposite of the morning star, with a small-bodied candle that gaps up between two bearish candles.
Fibonacci Retracement Levels:
The strategy uses Fibonacci retracement levels to determine potential support and resistance levels in the market. The main level considered in this strategy is the Fibonacci 0.5 level, which is the midpoint of the previous swing move.
Trading Accordingly:
To trade using this strategy, follow these steps:
a. Observe the Chart: Apply the indicator to your preferred chart, and observe the candlestick patterns and the plotted support, resistance, and Fibonacci 0.5 levels.
b. Buy Signal: A buy signal is generated when any of the bullish candlestick patterns (Bullish Engulfing, Hammer, Morning Star) occur, and the low price of the current candle is above or equal to the Fibonacci 0.5 level. This suggests a potential bullish reversal or continuation of an existing uptrend.
c. Sell Signal: A sell signal is generated when any of the bearish candlestick patterns (Bearish Engulfing, Shooting Star, Evening Star) occur, and the high price of the current candle is below or equal to the Fibonacci 0.5 level. This indicates a potential bearish reversal or continuation of an existing downtrend.
d. Risk Management: Place stop-loss orders to protect your position in case the market moves against your trade. Consider setting the stop-loss below the recent swing low for buy trades and above the recent swing high for sell trades.
e. Take Profit: Set a target for taking profits based on your risk-reward ratio. You can use the recent swing high for buy trades as a potential target and the recent swing low for sell trades.
f. Filter Signals: Keep in mind that not all signals will result in profitable trades. It's essential to filter signals with other technical analysis tools and consider the overall market context.
Remember that no trading strategy guarantees profits, and trading always carries inherent risks. It's crucial to practice proper risk management, use appropriate position sizing, and test the strategy thoroughly in a demo environment before applying it to live trading. Additionally, consider combining this strategy with other indicators or analysis methods to make more informed .
Correlation TrackerCorrelation Tracker Indicator
The Correlation Tracker indicator calculates and visualizes the correlation between two symbols on a chart. It helps traders and investors understand the relationship and strength of correlation between the selected symbol and another symbol of their choice.
Indicator Features:
- Correlation Calculation: The indicator calculates the correlation between two symbols based on the provided lookback period.
- Correlation Scale: The correlation value is normalized to a scale ranging from 0 to 1 for easy interpretation.
- Table Display: A table is displayed on the chart showing the correlation value and a descriptive label indicating the strength of the correlation.
- Customization Options: Users can customize the text color, table background color, and choose whether to display the Pearson correlation value.
- The Correlation Tracker indicator utilizes a logarithmic scale calculation, making it particularly suitable for longer timeframes such as weekly charts, thereby providing a more accurate and balanced measure of correlations across a wide range of values.
How to Use:
1. Select the symbol for which you want to track the correlation (default symbol is "SPX").
2. Adjust the lookback period to define the historical data range for correlation calculation.
3. Customize the text color and table background color according to your preference.
4. Choose whether to display the Pearson correlation value or a descriptive label for correlation strength.
5. Observe the correlation line on the chart, which changes color based on the strength of the correlation.
6. Refer to the correlation table for the exact correlation value or the descriptive label indicating the correlation strength.
Note: The indicator can be applied to any time frame chart and is not limited to logarithmic scale.
RD Key Levels (Weekly, Daily, Previous vWAP)The RexDog Key Levels indicator plots the weekly open, daily open, and the previous day vWAP close.
These are all critical price levels (zones) to know when trading any market or instrument. These areas are also high probability reaction areas that you can trade using simple confirmation trading patterns.
First, I'll cover an overview of the indicator then I'll share general usage tips.
Weekly Open - default is white/orange. White is when price is above the weekly open. Orange is when price is below the weekly open.
Weekly High/Low - there are options to turn on the weekly high and lows. Default plot is circles. Green is the high. Red is the low.
Daily Open - default is green/red. Green is when price is above the daily open. Red is when price is below the daily open.
Previous vWAPs - aqua single lines. These are the closing price of the daily vWAPs.
Top Indicators - The triangles at the top of the chart signify is price is currently above or below the weekly open. This is helpful on lower timeframe charts (5m, 15m) to get a quick indication when price is far extended beyond the weekly open. Green triangle = above weekly open. Red triangle = below weekly open.
General Usage
Each one of these levels are important levels markets look use for continuation or failure of momentum and bias. I also find it extremely helpful to think of these levels as magnets, dual magnets. They both attract and repel price at the same time. Now you might say, how is that helpful to have opposing views at the same time? Be indifferent to direction, create your own rules on when these price zones repel or attract price, I have my own.
Here's the easiest way to use these price levels.
As price approaches one of these levels to expect a reaction. A reaction is price is going in one direction and price hits a price level zone and reacts in the opposite direction.
These are price zones, sometimes you will see a reaction right at the price but visualize these areas as zones of reaction.
A high percentage of the time when price approaches these level zones there will be a reaction. So trade the reaction .
How do you do that?
Simple. Trade patterns that repeat. I have 3 solid patterns I trade around these key levels:
The first pattern is early entry with precise scale in rules and a very effective protective stop loss placement.
The second pattern is wait for confirmation that the level holds. This requires more patience and for you to fully trust the chart. The benefit of this pattern is with confirmation you have even more precise stop placement.
There is a bonus third pattern I trade around these levels. I call this the confirmation and bluff entry. It's a combination of both of the patterns above. You wait for confirmation but on any pull back you call the bluff on the market and enter on key test. Trade management here is critical. In addition to the pattern you trade you should have a series of failure patterns that tell you to get out of the trade, I use 2 primary failure patterns.
I trade all markets, same system, same rules, so I'll show a few examples.
Usually I start with Bitcoin but let's start with equities:
BA - Boeing - 8 Trades
Here we see weekly low patterns, previous week low test, vwAP hold patterns, day magnets and day holding. Then 2 week failures and a double hold pattern.
These are all straightforward trades to execute following really simple patterns.
BTCUSD Previous vWAP and Day Open Trades
We see here on the circle areas both daily open and previous day vWAP zone tests. Within this chart are all 3 highly effective patterns I trade.
SPY - 7 High Probability Trades
Here we see a pDay vWAP mixed with a daily failure. Next a daily retest, then a pDay vWAP failure, then a vWAP capture and test. Then a double weekly failure test (great trade there) and finally a daily test.
I could provide more examples but most are just derivatives of the above examples.
Parallel Projections [theEccentricTrader]█ OVERVIEW
This indicator automatically projects parallel trendlines or channels, from a single point of origin. In the example above I have applied the indicator twice to the 1D SPXUSD. The five upper lines (green) are projected at an angle of -5 from the 1-month swing high anchor point with a projection ratio of -72. And the seven lower lines (blue) are projected at an angle of 10 with a projection ratio of 36 from the 1-week swing low anchor point.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Support and Resistance
• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.
Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.
It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.
Trendlines
Trendlines are straight lines that are drawn between two or more points on a price chart. These lines are used as dynamic support and resistance levels for making strategic decisions and predictions about future price movements. For example traders will look for price movements along, and reactions to, trendlines in the form of rejections or breakouts/downs.
█ FEATURES
Inputs
• Anchor Point Type
• Swing High/Low Occurrence
• HTF Resolution
• Highest High/Lowest Low Lookback
• Angle Degree
• Projection Ratio
• Number Lines
• Line Color
Anchor Point Types
• Swing High
• Swing Low
• Swing High (HTF)
• Swing Low (HTF)
• Highest High
• Lowest Low
• Intraday Highest High (intraday charts only)
• Intraday Lowest Low (intraday charts only)
Swing High/Swing Low Occurrence
This input is used to determine which historic peak or trough to reference for swing high or swing low anchor point types.
HTF Resolution
This input is used to determine which higher timeframe to reference for swing high (HTF) or swing low (HTF) anchor point types.
Highest High/Lowest Low Lookback
This input is used to determine the lookback length for highest high or lowest low anchor point types.
Intraday Highest High/Lowest Low Lookback
When using intraday highest high or lowest low anchor point types, the lookback length is calculated automatically based on number of bars since the daily candle opened.
Angle Degree
This input is used to determine the angle of the trendlines. The output is expressed in terms of point or pips, depending on the symbol type, which is then passed through the built in math.todegrees() function. Positive numbers will project the lines upwards while negative numbers will project the lines downwards. Depending on the market and timeframe, the impact input values will have on the visible gaps between the lines will vary greatly. For example, an input of 10 will have a far greater impact on the gaps between the lines when viewed from the 1-minute timeframe than it would on the 1-day timeframe. The input is a float and as such the value passed through can go into as many decimal places as the user requires.
It is also worth mentioning that as more lines are added the gaps between the lines, that are closest to the anchor point, will get tighter as they make their way up the y-axis. Although the gaps between the lines will stay constant at the x2 plot, i.e. a distance of 10 points between them, they will gradually get tighter and tighter at the point of origin as the slope of the lines get steeper.
Projection Ratio
This input is used to determine the distance between the parallels, expressed in terms of point or pips. Positive numbers will project the lines upwards while negative numbers will project the lines downwards. Depending on the market and timeframe, the impact input values will have on the visible gaps between the lines will vary greatly. For example, an input of 10 will have a far greater impact on the gaps between the lines when viewed from the 1-minute timeframe than it would on the 1-day timeframe. The input is a float and as such the value passed through can go into as many decimal places as the user requires.
Number Lines
This input is used to determine the number of lines to be drawn on the chart, maximum is 500.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
If the lines do not draw or you see a study error saying that the script references too many candles in history, this is most likely because the higher timeframe anchor point is not present on the current timeframe. This problem usually occurs when referencing a higher timeframe, such as the 1-month, from a much lower timeframe, such as the 1-minute. How far you can lookback for higher timeframe anchor points on the current timeframe will also be limited by your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000.
█ RAMBLINGS
It is my current thesis that the indicator will work best when used in conjunction with my Wavemeter indicator, which can be used to set the angle and projection ratio. For example, the average wave height or amplitude could be used as the value for the angle and projection ratio inputs. Or some factor or multiple of such an average. I think this makes sense as it allows for objectivity when applying the indicator across different markets and timeframes with different energies and vibrations.
“If you want to find the secrets of the universe, think in terms of energy, frequency and vibration.”
― Nikola Tesla
Fan Projections [theEccentricTrader]█ OVERVIEW
This indicator automatically projects trendlines in the shape of a fan, from a single point of origin. In the example above I have applied the indicator twice to the 1D SPXUSD. The seven upper lines (green) are projected at an angle of -5 from the 1-month swing high anchor point. And the five lower lines (blue) are projected at an angle of 10 from the 1-week swing low anchor point.
█ CONCEPTS
Green and Red Candles
• A green candle is one that closes with a high price equal to or above the price it opened.
• A red candle is one that closes with a low price that is lower than the price it opened.
Swing Highs and Swing Lows
• A swing high is a green candle or series of consecutive green candles followed by a single red candle to complete the swing and form the peak.
• A swing low is a red candle or series of consecutive red candles followed by a single green candle to complete the swing and form the trough.
Peak and Trough Prices (Basic)
• The peak price of a complete swing high is the high price of either the red candle that completes the swing high or the high price of the preceding green candle, depending on which is higher.
• The trough price of a complete swing low is the low price of either the green candle that completes the swing low or the low price of the preceding red candle, depending on which is lower.
Historic Peaks and Troughs
The current, or most recent, peak and trough occurrences are referred to as occurrence zero. Previous peak and trough occurrences are referred to as historic and ordered numerically from right to left, with the most recent historic peak and trough occurrences being occurrence one.
Support and Resistance
• Support refers to a price level where the demand for an asset is strong enough to prevent the price from falling further.
• Resistance refers to a price level where the supply of an asset is strong enough to prevent the price from rising further.
Support and resistance levels are important because they can help traders identify where the price of an asset might pause or reverse its direction, offering potential entry and exit points. For example, a trader might look to buy an asset when it approaches a support level , with the expectation that the price will bounce back up. Alternatively, a trader might look to sell an asset when it approaches a resistance level , with the expectation that the price will drop back down.
It's important to note that support and resistance levels are not always relevant, and the price of an asset can also break through these levels and continue moving in the same direction.
Trendlines
Trendlines are straight lines that are drawn between two or more points on a price chart. These lines are used as dynamic support and resistance levels for making strategic decisions and predictions about future price movements. For example traders will look for price movements along, and reactions to, trendlines in the form of rejections or breakouts/downs.
█ FEATURES
Inputs
• Anchor Point Type
• Swing High/Low Occurrence
• HTF Resolution
• Highest High/Lowest Low Lookback
• Angle Degree
• Number Lines
• Line Color
Anchor Point Types
• Swing High
• Swing Low
• Swing High (HTF)
• Swing Low (HTF)
• Highest High
• Lowest Low
• Intraday Highest High (intraday charts only)
• Intraday Lowest Low (intraday charts only)
Swing High/Swing Low Occurrence
This input is used to determine which historic peak or trough to reference for swing high or swing low anchor point types.
HTF Resolution
This input is used to determine which higher timeframe to reference for swing high (HTF) or swing low (HTF) anchor point types.
Highest High/Lowest Low Lookback
This input is used to determine the lookback length for highest high or lowest low anchor point types.
Intraday Highest High/Lowest Low Lookback
When using intraday highest high or lowest low anchor point types, the lookback length is calculated automatically based on number of bars since the daily candle opened.
Angle Degree
This input is used to determine the angle of the trendlines. The output is expressed in terms of point or pips, depending on the symbol type, which is then passed through the built in math.todegrees() function. Positive numbers will project the lines upwards while negative numbers will project the lines downwards. Depending on the market and timeframe, the impact input values will have on the visible gaps between the lines will vary greatly. For example, an input of 10 will have a far greater impact on the gaps between the lines when viewed from the 1-minute timeframe than it would on the 1-day timeframe. The input is a float and as such the value passed through can go into as many decimal places as the user requires.
It is also worth mentioning that as more lines are added the gaps between the lines, that are closest to the anchor point, will get tighter as they make their way up the y-axis. Although the gaps between the lines will stay constant at the x2 plot, i.e. a distance of 10 points between them, they will gradually get tighter and tighter at the point of origin as the slope of the lines get steeper.
Number Lines
This input is used to determine the number of lines to be drawn on the chart, maximum is 500.
█ LIMITATIONS
All green and red candle calculations are based on differences between open and close prices, as such I have made no attempt to account for green candles that gap lower and close below the close price of the preceding candle, or red candles that gap higher and close above the close price of the preceding candle. This may cause some unexpected behaviour on some markets and timeframes. I can only recommend using 24-hour markets, if and where possible, as there are far fewer gaps and, generally, more data to work with.
If the lines do not draw or you see a study error saying that the script references too many candles in history, this is most likely because the higher timeframe anchor point is not present on the current timeframe. This problem usually occurs when referencing a higher timeframe, such as the 1-month, from a much lower timeframe, such as the 1-minute. How far you can lookback for higher timeframe anchor points on the current timeframe will also be limited by your Trading View subscription plan. Premium users get 20,000 candles worth of data, pro+ and pro users get 10,000, and basic users get 5,000.
█ RAMBLINGS
It is my current thesis that the indicator will work best when used in conjunction with my Wavemeter indicator, which can be used to set the angle. For example, the average wave height or amplitude could be used as the value for the angle input. Or some factor or multiple of such an average. I think this makes sense as it allows for objectivity when applying the indicator across different markets and timeframes with different energies and vibrations.
“If you want to find the secrets of the universe, think in terms of energy, frequency and vibration.”
― Nikola Tesla
2B Reversal Pattern (Expo)█ Overview
The 2B reversal pattern , also called the "spring pattern", is a popular chart pattern professional traders use to identify potential trend reversals. It occurs when the price appears to be breaking down or up and then suddenly bounces back up/down, forming a "spring" or "false breakout" pattern. This pattern indicates that the trend is losing momentum and that a reversal is coming.
In a bearish market , the "spring pattern" occurs when the price of an asset breaks below a support level, causing many traders to sell their positions and causing the price to drop even further. However, the selling pressure eases at some point, and the price begins to rebound, "springing" back above the support level. This rebound creates a long opportunity for traders who can enter the market at a lower price.
In a bullish market , the "spring pattern" occurs when the price of an asset breaks above a resistance level, causing many traders to buy into the asset and drive the price up even further. However, the buying pressure eases at some point, and the price begins to decline, "springing" below the resistance level. This decline creates a selling opportunity for traders who can short the market at a higher price.
█ What are the benefits of using the 2B Reversal Pattern?
The benefits of using the 2B Reversal pattern as a trader include identifying potential buying or selling opportunities with reduced risk. By waiting for the price to "spring back" to the initial breakout level, traders can avoid entering the market too soon and minimize the risk of potential losses.
█ How to use
Traders can use the 2B reversal pattern to identify reversals. If the pattern occurs after an uptrend, traders may sell their long positions or enter a short position, anticipating a reversal to a downtrend. If the pattern occurs after a downtrend, traders may sell their short positions or enter a long position, anticipating a reversal to an uptrend.
█ Consolidation Strategy
First, traders should identify a period of price consolidation or a trading range where the price has been trading sideways for some time. The key feature of the "spring pattern" is a sudden, sharp move downward/upwards through the lower/upper boundary of this trading range, often accompanied by high volume.
However, instead of continuing to move lower/higher, the price then quickly recovers and moves back into the trading range, often on low volume. This quick recovery is the "spring" part of the pattern and suggests that the market has rejected the lower/higher price and that buying/selling pressure is building.
Traders may use the "spring pattern" as a signal to buy/sell the asset, suggesting strong demand/supply for the stock at the lower/higher price level. However, as with all trading strategies, it is important to use other indicators and to manage risk to minimize potential losses carefully.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
FOREX MASTER PATTERN Companion ToolWhat This Indicator Does
The Forex Master Pattern uses candlesticks, which provide more information than line, OHLC or area charts. For this reason, candlestick patterns are a useful tool for gauging price movements on all time frames. While there are many candlestick patterns, there is one which is particularly useful...
The Engulfing Pattern
An engulfing pattern provides an excellent trading opportunity because it can be easily spotted and the price action indicates a strong and immediate change in direction. In a downtrend, an up candle real body will completely engulf the prior down candle real body (bullish engulfing). In an uptrend a down candle real body will completely engulf the prior up candle real body (bearish engulfing).
Used in conjunction with the FOREX Master Pattern value line, the Engulfing Pattern can assist the trader with reversal timing or trend confirmation during the expansion and trend phases.
As shown in the screenshot below. Engulfing Candles usually precede a sharp move in price in the direction of the engulfing candle.
As shown in the screenshot below, when the Show Lines option is ON while using the indicator, both red and green lines are drawn on the chart automatically when engulfing candles form. These lines are projected forward 100 bars and tend to be reliable support and resistance areas. These areas are typically hidden from view.
In addition to the Show Lines option, the indicator (by default) creates boxes around trading zones that are created when an engulfing candle is formed. (There is an option to hide these from view if desired).
As seen in the screenshot below, these areas / zones are wider than a line and encompass a resistance / support zone rather than a specific price. Liquidity is usually high in these areas and a lot of selling / buying occurs here. These zones are drawn in advance out into the future giving the trader an idea of where price will revert to eventually.
A combination of LINES and AREAS can be used giving the user a better idea of where within the zone price will go.
As seen on the screenshot below, this combination provides a pretty accurate indication of the reversal point well in advance.
As seen in the screenshot below, when a ZONE / AREA has been fully breached (crossed) by price, the area is deactivated an no longer continues forward on the chart. Until price breaches an area, it remains valid and continues on the chart until and only if it is breached by price.
The Indicator is fully customizable.
The use can change the color of the engulfing candles, the color of the zones, transparency etc. You can turn OFF or ON any of the features such as lines, zones, bar coloring, and plotted arrows.
I really hope you get value from this indicator and... HAPPY TRADING!!
Renko Emulator - Rev NR - Released - 12-29-22Renko Emulator - Rev NR - Released 12-29-22
By Hockeydude84
Simple script to Emulate Renko Charting behavior on standard candle stick charts. Code provide capability to select between standard(ish) Renko bricks (in this code it's defined by percent vs ticks/value), or an ATR brick option. For ATR bricks, the code provides an option to inhibit emulator movement (formation of new bricks) by providing a minimum threshold that must be present. This threshold is the "Standard Brick" input (the input pulls double duty). Code also provides multiple plotting options.
Use the code to help see trends and reduce the chop/erroneous data. Also helps to identify where trend deviations are present.
Pivot Pattern Boundaries [cajole]
This script automatically detects horizontal support / resistance levels based on user-programmable criteria.
For example, you can detect boundaries with >3 touches within 200 days, allowing a tolerance of 1/4*ATR.
"Touches" are defined from pivots on the chart. The best way to search for larger/smaller patterns is to increase/decrease the pivot size.*
Future versions will allow "exceptions (i.e. keep drawing the horizontal line even if it is breached once or twice).
*TradingView's Pine script defines a Pivot as the highest point in a group. So, entering "2" means that a day's high needs to be above 2 days before and after (xxYxx) to be considered a high pivot.
This script can be an aid in drawing multiple patterns with horizontal boundaries (rectangles, triangles, head and shoulders, cup & handles, VCPs). I have intentionally avoided trying to code detection of the "other side" of these patterns, as that is where the craft of charting becomes an art.
FluidTrades - SMC Lite
Price action and supply and demand is a key strategy use in trading. We wanted it to be easy and efficient for user to identify these zones, so the user can focus less on marking up charts and focus more on executing trades.
This indicator shows you supply and demand zones by using pivot points to show you the recent highs and the recent lows.
Features
This indicator includes some features relevant to SMC , these are highlighted below:
Full internal & swing market structure labeling in real-time
Swing Structure: Displays the swing structure labels & solid lines on the chart (BOS).
Supply & demand ( bullish & bearish )
Swing Points: Displays swing points labels on chart such as HH, HL, LH, LL.
Options to style the indicator to more easily display these concepts
White OB (supply): search for short opportunities
Blue OB (demand): search for long opportunities
Break of structure ( BOS )
For markets to move up and down a break in market structure must occur. A break in market structure occurs when the market begins to shift direction and break the previous HH and HL or HL and LL of the market. We also integrated the feature that you can see the BOS lines. In the indicator settings you can adjust the color of the label.
Settings
SwingHigh/Low Length: Allows the user to select Historical (default) or Present, which displays only recent data on the chart.
Supply/demand box width: Allows user to change the size of the supply and demand box
History to keep: allows the user to select how many most recent supply & demand box appear on the chart.
Visual settings
Show zig zag : allow user to see market patters within the market
Show price action labels: allow user to turn on/off the (swing points)
Supply box color : allow users to change the color of their supply box
Demand box color : allow users to change the color of their supply box
Bos label color : allow users to change the color of their BOS label
Poi label color : allow user to change the color of their POI label
Price action label : allow users to change the color of their swing points labels
Zig zag color : allow users to change the color of the zig/zag market patters
Warning
Never blindly take a trade on a supply/demand box - wait for a proper market structure to occur before considering a trade.
Weekly Power 3Did you know there is a simple line you can place on your chart to immediately make the weeks price action more understandable? Its called the Weekly Open Line. And its the opening price of the trading week. It was created by The Inner Circle Trader (ICT) and incorporates another one of his concepts called Power 3.
The Weekly Power 3 indicator takes the idea of the Weekly Open Line and builds a suite of intelligent and dynamic tools around it that will immediately help the user to start understanding how price moves within the trading week context.
Features
Static Weekly Open Line
Intelligent Days of the Week Text
Dynamic Weekly High Line
Dynamic Weekly Low Line
Weekly High Candle Label (highest candle of the week)
Weekly Low Candle Label (lowest candle of the week)
Best Odds High of the Week Zone Line & Text
Best Odds Low of the Week Zone Line & Text
Components
The primary feature is a line that forms on the weekly open price and grows as the week progresses. Additionally, lines are created for the highest and lowest prices of the week so the weekly profile can be easily recognized. A dynamic label marks each weeks highest and lowest point. This will automatically move as prices expand throughout the week.
A very useful component of the Weekly Power 3 indicator is the Days of the Week text. Each Day of the Week text is displayed in the middle of each trading day and also the user can specify in the Settings whether to position the text at the high or low of the weeks price range. Additionally, there is a Buffer setting that allows the user to move the Days of the Week text up or down to prevent chart overlapping.
To help the user visualize the span of time with the best odds of forming the weekly highs or weekly lows, according to ICT, this indicator adds at static line and optional label into the charts future that projects the span from Tuesday’s London Open to Wednesday’s New York. Having a static line out in the future on your chart really helps to picture where price could be drawn to based solely around time of the week.
Premise
ICT says that the weekly open price is the most important level that price reacts to across the five days of a trading week. If the week profile is expected to be bullish then price many times goes below the weekly open line at the beginning of the week and above it later in the week (a.k.a Bullish Power 3). Consequently, if the week is anticipated to be a bearish week, price often times starts the week high and then goes lower throughout the week (a.k.a Bearish Power 3).
ICT always specifies that the weekly high or weekly low have the best odds of forming between the Tuesday’s London Open and Wednesday’s New York Open.
Inputs and Style
Like all scripts publish by Infinity Trading, everything in the indicator is customizable by the user. Every label, line, or text can be individually toggled ON or OFF so the user has complete control over the elements they want displayed on their chart. All of the lines can be individually adjusted by color, line style, or line width. The color and text color on the high and low of the week labels can be individually changed. The text in the chart (day of the week & best odds zones text) each have a “buffer” value. This allows the user to individually move the text up or down on the chart to declutter the chart. And lastly, the day of the week text can be positioned above or below the weeks price action and the text will dynamically move higher or lower as price expands throughout the week.
Previous weeks have all of the Weekly Power 3 markups so it's easy to study past price action and identify trends.
Gallery
View the weeks price action
View multiple weeks price action
Visualize future price action
Trend/Retracement - ZigZag - New wayZigZag for Trend and Retracements - New way
It's another way to plot ZigZag based on lookback period for trend and % of trend lookback period to plot retracements.
█ OVERVIEW
Plot ZigZag, Trend lines, Retracements, Support levels, Resistance levels
█ Objective:
Draw ZigZag lines along with unbroken support and resistance levels. ZigZag lines are drawn for main trend and the retracements.
Main Trend – This is calculated based on lookback period.
Retracements – Retracements are calculated as 25% of main trend.
Support and Resistance line: The indicator draws 2 types of support and resistance lines
1. Un-broken – Once formed (plotted), these are the support and resistance which are not yet broken
2. Tested – One can also choose to see support and resistance lines which are tested but not broken. Tested support/resistance are those levels which are touched by high/low price but close price has not crossed the level.
█ How main trend point is calculated:
E.g.
Chart timeframe = 15m
Lookback period = 250
Retracement = 25% of main trend ( 25% of 250 = 62 )
A price point on a chart is considered as trend point if distance between current price and previous highest price is 250 candles
A price point is considered as a retracement if distance between current price and previous highest price is 62 candles. Please note retracements are calculated only after finding a main trend point.
█ Input parameters:
Zigzag Parameters
Use predefined Lookback – If checked pre-defined timeframe-based lookback parameters are used.
Trend lookback candles – If ‘Use predefined Lookback’ is unchecked then this value is used as lookback period.
Retracement % of look back candles– If ‘Use predefined Lookback’ is unchecked then this value is used for calculating retracement lookback period
Mark retracements – If unchecked only main trend lines are plotted
Plot support/resistance – To plot support/resistance levels
Show support/resistance tested lines – If checked tested support/resistance liens are shown on the chart
█ TF based Lookback period config (Defaults are set as specified below, One can change these defaults to use different lookback periods)
The defaults set here are used based on the chart timeframe. e.g. if chart timeframe is changed from say 15m to 60m then 60m chart defaults (i.e. trend lookback = 90) are used to plot the trend and the retracements. At the bottom-right of the chart, parameters used for plotting are displayed all the time.
Timeframe in minute – Default = 5m
Trend lookback candles – Default = 375 (~ 5 days of data)
Timeframe in minute – Default = 15m
Trend lookback candles – Default = 250 (~10 days of data)
Timeframe in minute – Default = 60m
Trend lookback candles = Default = 90 (~ 15 days of data)
Trend lookback candles for timeframe 'D' – Default = 30 (~1 month data)
Trend lookback candles for timeframe 'W' – Default = 21 (~6 months data)
Trend lookback candles for timeframe 'M' – Default = 12 (~1year data)
Retracement % of look back candles – Default = 25%
█ When and where one can use this indicator (Refer to chart examples)
To view support and resistance based on lookback period
To view ZigZag lines
One can use it to find chart patterns easily
Trend and retracement lines can help in drawing Elliott waves.
█ Chart examples:
1. Chart patterns can be easily identified - One can disable the candle charts which will help to identify and draw chart patterns easily
2. Trend and retracement lines can also help is analyzing charts (e.g. Elliott Waves can be marked based on trend lines)
3. Tested but not broken support and resistance lines can be viewed
4. You can select 'NOT' to plot tested support and resistance lines
5. Uncheck the Mark retracements to plot main trend lines (Retracements are not marked)
Chart VWAP█ OVERVIEW
This indicator displays a Volume-Weighted Average Price anchored to the leftmost visible bar of the chart. It dynamically recalculates when the chart's visible bars change because you scroll or zoom your chart.
If you are not already familiar with VWAP, our Help Center will get you started. The typical VWAP is designed to be used on intraday charts, as it resets at the beginning of the day. Our Rolling VWAP , instead, resets on a rolling time window. You may also find the VWAP Auto Anchored built-in indicator worth a try.
█ HOW TO USE IT
Load the indicator on an active chart (see the Help Center if you don't know how). By default, it displays the chart's VWAP in orange and a simple average of the chart's visible close values in gray. This average can be used as a companion to the VWAP, since both are calculated from the same set of bars. The script's settings allow you to hide it.
You may also use the script's settings to enable the display of the chart's OHLC (open, high, low, close) levels and the values of the high and low. These are also calculated from the range of visible bars. You can complement the high and low lines with their price and their distance in percent from the chart's latest visible close . You can use the levels to quickly identify the distances from extreme points in the visible price range, as well as observe the visible chart's beginning and end prices.
█ NOTES FOR Pine Script™ CODERS
This script showcases three novelties:
• Dynamic recalculation on visible bars
• The VisibleChart library by PineCoders
• The new `anchor` parameter of ta.vwap()
Dynamic recalculation on visible bars
This script behaves in a novel way made possible by the recent introduction of two new built-in variables: chart.left_visible_bar_time and chart.right_visible_bar_time , which return the opening time of the leftmost and rightmost visible bars on the chart. These are only two of many new built-ins in the `chart.*` namespace. See this blog post for more information, or look up them up by typing "chart." in the Pine Script™ Reference Manual .
Any script using chart.left_visible_bar_time or chart.right_visible_bar_time acquires a unique property, which triggers its recalculation when traders scroll or zoom their chart, causing the range of visible bars to change. This new capability is what makes it possible for this script to calculate its VWAP on the chart's visible bars only, and dynamically recalculate if the user scrolls or zooms their chart.
This script is just a start to the party; endless uses for indicators that redraw on changes to the chart will no doubt emerge through the hands of our community's Pine Script™ programmers.
The VisibleChart library by PineCoders
The newly published VisibleChart library is designed to help programmers benefit from the new capabilities made possible by the fact that Pine Script™ code can now tell when it is executing on visible bars. The library's description, functions and example code will help programmers make the most of the new feature.
This script uses three of the library's functions:
• `PCvc.vVwap()` calculates a VWAP for visible bars.
• `PCvc.avg()` calculates the average of a source value for visible bars only. We use it to calculate the average close (the default source).
• `PCvc.chartXTimePct(25)` calculates a time value corresponding to 25% of the horizontal distance between visible bars, starting from the left.
The new `anchor` parameter of ta.vwap()
Our script also uses this new `anchor` parameter to reset the VWAP at the leftmost visible bar. See how simple the code is for the VisibleChart library's `vVwap()` function.
Look first. Then leap.
Lower time frame Intrabar CandlesI was looking for an indicator to show me what a lower time frame is doing at the start, middle, and end of the candle, but I couldn't find one, hench,
I made my own using Tradingview latest capabilities to fetch a lower time frame from a higher time frame chart.
For example, if your chart is 1 hour and this indicator is set to a lower time frame of 15 minutes, then the Start, Middle, or End (Select which in settings) of the 15min candle will be displayed overlaying the 1-hour candle.
This will always show you what the lower time frame candle is currently doing without the need to open an additional lower time frame chart. How cool is that?
Remember to select a lower time frame in the settings than the chart time frame for it to work as expected.
Enjoy :)
-=== Notes ===-
* The lower time frame candles BORDER is set to WHITE by default, however, you can adjust the color of the candle (wicks, body, and border) of the 'LTF Candle' indicator inside its Settings -> Style
* Suitable for candles and designed to work in historical and real time.
* Added optional label to show lower time frame values (can be disabled via indicator settings).
* You can adjust the visuals of the chart candles at Chart Settings -> Symbol -> Body, Borders, or Wicks to visually see better the lower time frame candles.
There is also a similar concept volume-based using histogram, stay tuned.
Like if you like and follow: www.tradingview.com
Charting the US02Y-US10YPutting together a script that charts the US02Y - US10Y in visual format. First script I've ever written and would like some feed back as to how I could improve. Also currently have to turn on "Indicator Last Value Label, and Indicator Name Label" if you would like data to appear on the chart. Works best when the US02Y-US10Y chart is being displayed!
Multi-Timeframe Countdown Timer TTHello TradingView Community,
I'm excited to share the latest version of an indicator I've developed: The **Multi-Timeframe Countdown Timer v6**.
**What is this indicator?**
This indicator provides a clear and convenient countdown showing the time remaining until the *next candle closes* for *multiple timeframes* simultaneously on your chart.
**Key Features & Benefits:**
Tracking candle closing times across different timeframes is crucial for many trading strategies. This indicator makes it easy and visually intuitive:
1. **Multi-Timeframe Support:** Monitor countdowns for several timeframes all at once, including higher timeframes than your current chart view.
2. **Compact Table Display:** See all your chosen timers neatly organized in a small, unobtrusive table directly on your chart.
3. **Full Customization:** Tailor the indicator to your needs! You can easily customize:
* **Display Position:** Choose where the table appears on your chart.
* **Text Size:** Adjust the size of the countdown text for readability.
* **Colors:** Set colors for the background, text, and warning state.
* **Timeframe Selection:** Easily select which timeframes you want to track.
4. **4H Candle Reference Time Adjustment:** A unique feature that allows you to adjust the *start time* reference for the 4-hour candle countdown. This is essential for aligning the timer correctly with different exchange or broker time settings, ensuring accurate 4H tracking.
5. **Warning Color Alert:** The timer changes color (default: red) when there are less than 10 seconds remaining, giving you a clear visual alert just before the candle closes.
**How to Use:**
Simply add the "Multi-Timeframe Countdown Timer v6" indicator to your chart. Open its settings to select the timeframes you want to track, adjust the display position, size, colors, and configure the 4H reference time if needed.
This indicator is perfect for traders who need to stay precise with their timing and monitor activity across various time perspectives without constantly switching timeframes.
I hope you find this tool valuable for your trading! Please give it a try and share any feedback or suggestions in the comments below. If you find it useful, please hit the "Like" button!
Happy Trading!
RSI/BB/MACD/VWAP/SMA Strategy [vivekm8955]🚀 Boost Your Trading with the Enhanced BB/MACD/SMA Strategy!
🔍 What Makes This Strategy Unique?
This Bollinger Bands (BB) + MACD + SMA strategy is designed for traders who want clear, high-probability signals without unnecessary noise. By focusing on three powerful indicators, it provides clean entries and exits while maintaining strong risk management.
📊 Key Features:
✅ Simplified & Effective Signals – Uses BB, MACD, and SMA for high-confidence trades
✅ Smart Trend Filtering – Avoids false signals by confirming trend direction
✅ Built-in Risk Management – Includes stop-loss, take-profit, and trailing stop
✅ Professional Visuals – Clean chart with entry/exit markers, stop levels, and trend colors
✅ Real-Time Alerts – Get notified instantly when signals appear
📈 How It Works
1️⃣ Entry Conditions
🔵 Long (Buy) Signal:
Price touches Bollinger Band Lower
MACD bullish crossover (MACD line > Signal line)
Price above SMA (50) confirming uptrend
🔴 Short (Sell) Signal:
Price touches Bollinger Band Upper
MACD bearish crossover (MACD line < Signal line)
Price below SMA (50) confirming downtrend
2️⃣ Exit & Risk Management
Stop-Loss (1%) – Protects against sudden reversals
Take-Profit (2%) – Locks in gains
Trailing Stop (0.5%) – Secures profits in trending markets
🌍 Why Traders Worldwide Love This Strategy
✔ Works on All Timeframes – Scalp, swing, or invest
✔ Adapts to Any Market – Stocks, Forex, Crypto, Commodities
✔ Removes Guesswork – Clear rules, no emotional trading
✔ Professional-Grade – Used by hedge funds & retail traders alike
📢 Join Thousands of Successful Traders!
🔹 Copy & Paste the script into TradingView
🔹 Backtest & Optimize for your favorite assets
🔹 Set Alerts to never miss a trade
💬 What Traders Are Saying:
"This strategy cuts through the noise—simple but powerful!" – @CryptoTrader
"Finally, a BB/MACD system with proper risk management!" – @ForexMaster
🚀 Get the Script Now!
👉 Copy the Pine Script from above
👉 Apply it to your charts
👉 Start trading with confidence!
📢 Share this with fellow traders & let’s grow together!
#TradingStrategy #BollingerBands #MACD #SMA #AlgorithmicTrading #DayTrading #Investing #Forex #Crypto #Stocks
Automated Trading Session: New York KillzoneAutomated Trading Session: New York Killzone (Timezone & DST Aware)
This indicator tracks the New York Killzone session using intraday data and real-time timezone adjustments. It draws high/low boxes after the session ends and highlights the active session on your chart, making it ideal for traders focused on U.S. market volatility.
Key Features
Timezone & DST Support
Accurately reflects session timing based on your selected timezone and daylight saving settings.
Custom Session Input
Set your preferred New York Killzone hours (default: 08:00–09:30 New York time).
Visual Session Boxes
High/low ranges of the session are boxed on the chart for quick reference.
End-of-Session Alert
Get notified when the session closes, supporting both manual and automated workflows.
On-Chart Info Table
Displays active session time and timezone directly on the chart.
Smart Range DetectorSmart Range Detector
What It Does
This indicator automatically detects and validates significant trading ranges using pivot point analysis combined with logarithmic fibonacci relationships. It operates by identifying specific pivot patterns (High-Low-High and Low-High-Low) that meet fibonacci validation criteria to filter out noise and highlight only the most reliable trading ranges. Each range is continuously monitored for potential mitigation (breakout) events.
Key Features
Identifies both High-Low-High and Low-High-Low range patterns
Validates each range using logarithmic fibonacci relationships (more accurate than linear fibs)
Detects range mitigations (breakouts) and visually differentiates them
Shows fibonacci levels within ranges (25%, 50%, 75%) for potential reversal points
Visualizes extension levels beyond ranges for breakout targets
Analyzes volume profile with customizable price divisions (default: 60)
Displays Point of Control (POC) and Value Area for traded volume analysis
Implements performance optimization with configurable range limits
Includes user-adjustable safety checks to prevent Pine Script limitations
Offers fully customizable colors, line widths, and transparency settings
How To Use It
Identify Valid Ranges : The indicator automatically detects and highlights trading ranges that meet fibonacci validation criteria
Monitor Fibonacci Levels : Watch for price reactions at internal fib levels (25%, 50%, 75%) for potential reversal opportunities
Track Extension Targets : Use the extension lines as potential targets when price breaks out of a range
Analyze Volume Structure : Enable the volume profile mode to see where most volume was traded within mitigated ranges
Trade Range Boundaries : Look for reactions at range highs/lows combined with volume POC for higher probability entries
Manage Performance : Adjust the maximum displayed ranges and history bars settings for optimal chart performance
Settings Guide
Left/Right Bars Look Back : Controls how far back the indicator looks to identify pivot points (higher values find more ranges but may reduce sensitivity)
Max History Bars : Limits how far back in history the indicator will analyze (stays within Pine Script's 10,000 bar limitation)
Max Ranges to Display : Restricts the total number of ranges kept in memory for improved performance (1-50)
Volume Profile : When enabled, shows volume distribution analysis for mitigated ranges
Volume Profile Divisions : Controls the granularity of the volume analysis (higher values show more detail)
Display Options : Toggle visibility of range lines, fibonacci levels, extension lines, and volume analysis elements
Transparency & Color Settings : Fully customize the visual appearance of all indicator elements
Line Width Settings : Adjust the thickness of lines for better visibility on different timeframes
Technical Details
The indicator uses logarithmic fibonacci calculations for more accurate price relationships
Volume profile analysis creates 60 price divisions by default (adjustable) for detailed volume distribution
All timestamps are properly converted to work with Pine Script's bar limitations
Safety checks prevent "array index out of bounds" errors that plague many complex indicators
Time-based coordinates are used instead of bar indices to prevent "bar index too far" errors
This indicator works well on all timeframes and instruments, but performs best on 5-minute to daily charts. Perfect for swing traders, range traders, and breakout strategists.
What Makes It Different
Most range indicators simply draw boxes based on recent highs and lows. Smart Range Detector validates each potential range using proven fibonacci relationships to filter out noise. It then adds sophisticated volume analysis to help traders identify the most significant price levels within each range. The performance optimization features ensure smooth operation even on lower timeframes and extended history analysis.
Guppy Multiple Moving Average (GMMA)The GMMA Momentum Indicator plots 12 EMAs on your chart, divided into two groups:
Short-term EMAs (6 lines, default periods: 3, 5, 8, 10, 12, 15): Represent short-term trader sentiment and momentum.
Long-term EMAs (6 lines, default periods: 30, 35, 40, 45, 50, 60): Reflect long-term investor behavior and broader market trends.
By analyzing the interaction between these two groups, the indicator identifies:
Bullish and bearish trends based on the relative positions of the short- and long-term EMAs.
Momentum strength through the spread or convergence of the EMAs.
Potential reversals or breakouts via compression signals.
This PineScript version enhances the traditional GMMA by adding visual cues like background colors, bearish signals, and compression detection, making it ideal for swing traders seeking clear, actionable insights.
The GMMA Momentum Indicator provides several key features:
1. Trend Identification
Bullish Trend: When the short-term EMAs (green lines) are above the long-term EMAs (blue lines) and spreading apart, it signals strong upward momentum. The chart background turns light green to highlight this condition.
Bearish Trend: When the short-term EMAs cross below the long-term EMAs and converge, it indicates downward momentum. The background turns light red, and an orange downward triangle appears above the bar to mark a new bearish signal.
2. Momentum Analysis
The spread between the short-term EMAs reflects the strength of short-term momentum. A wide spread suggests strong momentum, while a tight grouping indicates weakening momentum or consolidation. Similarly, the long-term EMAs act as dynamic support or resistance, guiding traders on the broader trend.
3. Compression Detection
Compression occurs when both the short-term and long-term EMAs converge, signaling low volatility and a potential breakout or reversal. A yellow upward triangle appears below the bar when compression is detected, alerting traders to watch for price action.
4. Visual Cues
Green short-term EMAs: Show short-term trader activity.
Blue long-term EMAs: Represent long-term investor sentiment.
Background colors: Light green for bullish trends, light red for bearish trends, and transparent for neutral conditions.
Orange downward triangles: Mark new bearish trends.
Yellow upward triangles: Indicate compression, hinting at potential breakouts.
How to Use the GMMA Momentum Indicator for Swing Trading
Swing trading involves capturing price moves over days to weeks, and the GMMA Momentum Indicator is an excellent tool for this strategy. Here’s how to use it effectively:
1. Identifying Trade Entries
Buy Opportunities:
Look for a bullish trend (green background) where the short-term EMAs are above the long-term EMAs and spreading apart, indicating strong momentum.
A compression signal (yellow triangle) followed by a breakout above resistance or a bullish candlestick pattern can confirm an entry.
Example: On a daily chart, if the short-term EMAs cross above the long-term EMAs and the background turns green, consider entering a long position, especially if volume supports the move.
Sell Opportunities:
Watch for a bearish signal (orange downward triangle) or a bearish trend (red background) where the short-term EMAs cross below the long-term EMAs.
Example: If the short-term EMAs collapse below the long-term EMAs and an orange triangle appears, it may signal a shorting opportunity or a time to exit longs.
2. Managing Trades
Use the long-term EMAs as dynamic support (in uptrends) or resistance (in downtrends) to set stop-loss levels or trail stops.
Monitor the spread of the short-term EMAs. A widening spread suggests the trend is strong, while convergence may indicate it’s time to take profits or tighten stops.
3. Anticipating Reversals
Compression signals (yellow triangles) highlight periods of low volatility, often preceding significant price moves. Combine these with price action (e.g., breakouts or reversals) or other indicators (e.g., RSI or volume) for confirmation.
Example: If a compression signal appears near a key support level and the price breaks upward, it could signal the start of a new bullish swing.
4. Best Practices
Timeframes: The indicator works well on daily or 4-hour charts for swing trading, but you can adjust the EMA periods for shorter (e.g., 1-hour) or longer (e.g., weekly) timeframes.
Confirmation: Combine the GMMA with other tools like support/resistance levels, candlestick patterns, or oscillators (e.g., MACD) to reduce false signals.
Risk Management: Always use proper position sizing and stop-losses, as EMAs are lagging indicators and may produce delayed signals in choppy markets.
Multiple (12) Strong Buy/Sell Signals + Momentum
Indicator Manual: "Multiple (12) Strong Buy/Sell Signals + Momentum"
This indicator is designed to identify strong buy and sell signals based on 12 configurable conditions, which include a variety of technical analysis methods such as trend-following indicators, pattern recognition, volume analysis, and momentum oscillators. It allows for customizable alerts and visual cues on the chart. The indicator helps traders spot potential entry and exit points by displaying buy and sell signals based on the selected conditions.
Key Observations:
• The script integrates multiple indicators and pattern recognition methods to provide comprehensive buy/sell signals.
• Trend-based indicators like EMAs and MACD are combined with pattern recognition (flags, triangles) and momentum-based signals (RSI, ADX, and volume analysis).
• User customization is a core feature, allowing adjustments to the conditions and thresholds for more tailored signals.
• The script is designed to be responsive to market conditions, with multiple conditions filtering out noise to generate reliable signals.
________________________________________
Key Features:
1. 12 Combined Buy/Sell Signal Conditions: This indicator incorporates a diverse set of conditions based on trend analysis, momentum, and price patterns.
2. Minimum Conditions Input: You can adjust the threshold of conditions that need to be met for the buy/sell signals to appear.
3. Alert Customization: Set alert thresholds for both buy and sell signals.
4. Dynamic Visualization: Buy and sell signals are shown as triangles on the chart, with momentum signals highlighted as circles.
________________________________________
Detailed Description of the 12 Conditions:
1. Exponential Moving Averages (EMA):
o Conditions: The indicator uses EMAs with periods 3, 8, and 13 for quick trend-following signals.
o Bullish Signal: EMA3 > EMA8 > EMA13 (Bullish stack).
o Bearish Signal: EMA3 < EMA8 < EMA13 (Bearish stack).
o Reversal Signal: The crossing over or under of these EMAs can signify trend reversals.
2. MACD (Moving Average Convergence Divergence):
o Fast MACD (2, 7, 3) is used to confirm trends quickly.
o Bullish Signal: When the MACD line crosses above the signal line.
o Bearish Signal: When the MACD line crosses below the signal line.
3. Donchian Channel:
o Tracks the highest high and lowest low over a given period (default 20).
o Breakout Signal: Price breaking above the upper band is bullish; breaking below the lower band is bearish.
4. VWAP (Volume-Weighted Average Price):
o Above VWAP: Bullish condition (price above VWAP).
o Below VWAP: Bearish condition (price below VWAP).
5. EMA Stacking & Reversal:
o Tracks the order of EMAs (3, 8, 13) to confirm strong trends and reversals.
o Bullish Reversal: EMA3 < EMA8 < EMA13 followed by a crossing to bullish.
o Bearish Reversal: EMA3 > EMA8 > EMA13 followed by a crossing to bearish.
6. Bull/Bear Flags:
o Bull Flag: Characterized by a strong price movement (flagpole) followed by a pullback and breakout.
o Bear Flag: Similar to Bull Flag but in the opposite direction.
7. Triangle Patterns (Ascending and Descending):
o Detects ascending and descending triangles using pivot highs and lows.
o Ascending Triangle: Higher lows and flat resistance.
o Descending Triangle: Lower highs and flat support.
8. Volume Sensitivity:
o Identifies price moves with significant volume increases.
o High Volume: When current volume is significantly above the moving average volume (set to 1.2x of the average).
9. Momentum Indicators:
o RSI (Relative Strength Index): Confirms overbought and oversold levels with thresholds set at 65 (overbought) and 35 (oversold).
o ADX (Average Directional Index): Confirms strong trends when ADX > 28.
o Momentum Up: Momentum is upward with strong volume and bullish RSI/ADX conditions.
o Momentum Down: Momentum is downward with strong volume and bearish RSI/ADX conditions.
10. Bollinger & Keltner Squeeze:
o Squeeze Condition: A contraction in both Bollinger Bands and Keltner Channels indicates low volatility, signaling a potential breakout.
o Squeeze Breakout: Price breaking above or below the squeeze bands.
11. 3 Consecutive Candles Condition:
o Bullish: Price rises for three consecutive candles with higher highs and lows.
o Bearish: Price falls for three consecutive candles with lower highs and lows.
12. Williams %R and Stochastic RSI:
o Williams %R: A momentum oscillator with signals when the line crosses certain levels.
o Stochastic RSI: Provides overbought/oversold levels with smoother signals.
o Combined Signals: You can choose whether to require both WPR and StochRSI to signal a buy/sell.
________________________________________
User Inputs (Inputs Tab):
1. Minimum Conditions for Buy/Sell:
o min_conditions: Number of conditions required to trigger a buy/sell signal on the chart (1 to 12).
o Alert_min_conditions: User-defined alert threshold (how many conditions must be met before an alert is triggered).
2. Donchian Channel Settings:
o Show Donchian: Toggle visibility of the Donchian channel.
o Donchian Length: The length of the Donchian Channel (default 20).
3. Bull/Bear Flag Settings:
o Bull Flag Flagpole Strength: ATR multiplier to define the strength of the flagpole.
o Bull Flag Pullback Length: Length of pullback for the bull flag pattern.
o Bull Flag EMA Length: EMA length used to confirm trend during bull flag pattern.
Similar settings exist for Bear Flag patterns.
4. Momentum Indicators:
o RSI Length: Period for calculating the RSI (default 9).
o RSI Overbought: Overbought threshold for the RSI (default 65).
o RSI Oversold: Oversold threshold for the RSI (default 35).
5. Bollinger/Keltner Squeeze Settings:
o Squeeze Width Threshold: The maximum width of the Bollinger and Keltner Bands for squeeze conditions.
6. Stochastic RSI Settings:
o Stochastic RSI Length: The period for calculating the Stochastic RSI.
7. WPR Settings:
o WPR Length: Period for calculating Williams %R (default 14).
________________________________________
User Inputs (Style Tab):
1. Signal Plotting:
o Control the display and colors of the buy/sell signals, momentum indicators, and pattern signals on the chart.
o Buy/Sell Signals: Can be customized with different colors and shapes (triangle up for buys, triangle down for sells).
o Momentum Signals: Custom circle placement for momentum-up or momentum-down signals.
2. Donchian Channel:
o Show Donchian: Toggle visibility of the Donchian upper, lower, and middle bands.
o Band Colors: Choose the color for each band (upper, lower, middle).
________________________________________
How to Use the Indicator:
1. Adjust Minimum Conditions: Set the minimum number of conditions that must be met for a signal to appear. For example, set it to 5 if you want only stronger signals.
2. Set Alert Threshold: Define the number of conditions needed to trigger an alert. This can be different from the minimum conditions for visual signals.
3. Customize Appearance: Modify the colors and styles of the signals to match your preferences.
________________________________________
Conclusion:
This comprehensive trading indicator uses a combination of trend-following, pattern recognition, and momentum-based conditions to help you spot potential buy and sell opportunities. By adjusting the input settings, you can fine-tune it to match your specific trading strategy, making it a versatile tool for different market conditions.
Signal Reliability Based on Condition Count
The reliability of the buy/sell signals increases as more conditions are met. Here's a breakdown of the probabilities:
1. 1-3 Conditions Met: Lower Probability
o Signals that meet only 1-3 conditions tend to have lower reliability and are considered less probable. These signals may represent false positives or weaker market movements, and traders should approach them with caution.
2. 4 Conditions Met: More Reliable Signal
o When 4 conditions are met, the signal becomes more reliable. This indicates that multiple indicators or market patterns are aligning, increasing the likelihood of a valid buy/sell opportunity. While not foolproof, it's a stronger indication that the market may be moving in a particular direction.
3. 5-6 Conditions Met: Strong Signal
o A signal meeting 5-6 conditions is considered a strong signal. This indicates a well-confirmed move, with several technical indicators and market factors aligning to suggest a higher probability of success. These are the signals that traders often prioritize.
4. 7+ Conditions Met: Rare and High-Confidence Signal
o Signals that meet 7 or more conditions are rare and should be considered high-confidence signals. These represent a significant alignment of multiple factors, and while they are less frequent, they are highly reliable when they do occur. Traders can be more confident in acting on these signals, but they should still monitor market conditions for confirmation.
________________________________________
You can adjust the number of conditions as needed, but this breakdown should give a clear structure on how the signal strength correlates with the number of conditions met!