MFI + Realtime DivergencesMoney Flow Index (MFI) + Realtime Divergences + Alerts
This version of the MFI indicator adds the following 5 additional features to the stock MFI:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Background colouring option to indicate when the MFI oscillator has crossed above or below its centerline, or optionally when both the MFI has crossed its centerline and an external oscillator, which can be linked via the settings, has also crossed its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the standard MFI , whose core calculations remain unchanged. Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the TSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
What is the Money Flow Index ( MFI )?
Investopedia describes the True Strength Indicator as follows:
“The Money Flow Index ( MFI ) is a technical oscillator that uses price and volume data for identifying overbought or oversold signals in an asset. It can also be used to spot divergences which warn of a trend change in price. The oscillator moves between 0 and 100.
Unlike conventional oscillators such as the Relative Strength Index ( RSI ), the Money Flow Index incorporates both price and volume data, as opposed to just price. For this reason, some analysts call MFI the volume-weighted RSI .”
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable pivot periods.
You can adjust the default pivot periods to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock MFI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
סטייה
RF+ Divergence Scalping SystemRF+ Divergence Scalping System + Custom Signals + Alerts.
This chart overlay indicator has been developed for the low timeframe divergence scalper.
Built upon the realtime divergence drawing code from the Divergence for Many indicator originally authored by Lonsometheblue, this chart overlay indicator bundles several additional unique features and modifications to serve as an all-in-one divergence scalping system. The current key features at the time of publishing are listed below (features are optional and can be enabled or disabled):
- Fully configurable realtime divergence drawing and alerting feature that can draw divergences directly on the chart using data sourced from up to 11 oscillators selected by the user, which have been included specifically for their ability to detect divergences, including oscillators not presently included in the original Divergence for Many indicator, such as the Ultimate Oscillator and TSI.
- Optional on chart table showing a summary of key statuses of various indicators, and nearby divergences.
- 2 x Range Filters with custom settings used for low timeframe trend detection.
- 3 x configurable multi-timeframe Stochastic RSI overbought and oversold signals with presentation options.
- On-chart pivot points drawn automatically.
- Automatically adjusted pivot period for up to 4 configurable time frames to fine tune divergences drawn for optimal divergence detection.
- Real-price line for use with Heikin Ashi candles, with styling options.
- Real-price close dots for use with Heikin Ashi candles, with styling options.
- A selection of custom signals that can be printed on-chart and alerted.
- Sessions indicator for the London, New York, Tokyo and Sydney trading sessions, including daylight savings toggle, and unique ‘invert background color’ option, which colours the entire chart - except the trading session you have selected, leaving your chart clear of distracting background color.
- Up to 4 fully configurable moving averages.
- Additional configurable settings for numerous built in indicators, allowing you to alter the lengths and source types, including the UO, TSI, MFI, TSV, 2 x Range Filters.
- Configurable RSI Trend detection signal filter used in a number of the signals, which filters buy signals where the RSI is over the RSI moving average, and only prints sell signals where RSI is under the moving average.
- Customisable on-chart watermark, with inputs for a custom title, subtitle, and also an optional symbol | timeframe | date feature.
The Oscillators able to be selected for use in drawing divergences at the time of publishing are as follows:
- Ultimate Oscillator (UO)
- True Strength Indicator (TSI)
- Money Flow Index (MFI)
- Cumulative Delta Volume (CDV)
- Time Segmented Volume (TSV)
- Commodity Channel Index (CCI)
- Awesome Oscillator
- Relative Strength Index (RSI)
- Stochastic
- On Balance Volume (OBV)
- MACD Histogram
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, also when the triple timeframe Stochastic RSI overbought and oversold confluences occur, as well as when custom signals are printed.
Configurable pivot period values.
You can adjust the default pivot period values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable time frames, in a bid to optimize the divergences drawn when the indicator is loaded onto any of the 4 time frames selected. These time frames and their associated pivot periods can be fully reconfigured within the settings menu. By default, these have been further optimized for the low timeframe scalper trading on the 1-15 minute time frames.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
How do traders use overbought and oversold levels in their trading?
The oversold level is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at, or crossing down from an overbought level as a confluence for entry into a short position, and the Stochastic RSI at, or crossing up from an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI.
This indicator is intended for use in conjunction with related panel indicators including the TSI+ (True Strength Indicator + Realtime Divergences), UO+ (Ultimate Oscillator + Realtime Divergences), and optionally the STRSI+ (MTF Stochastic RSI + Realtime Divergences) and MFI+ (Money Flow Index + Realtime Divergences) available via this authors’ Tradingview profile, under the scripts section. The realtime divergence drawing code will not identify all divergences, so it is suggested that you also have panel indicators to observe. Each panel indicator also offers additional means of entry confirmation into divergence trades, for example, the Stochastic can indicate when it is crossing down from overbought or up from oversold, the TSi can indicate when the 2 TSI bands cross over one another upward or downward, and the UO and MFI can indicate an entry confluence when they are nearing, or crossing their centerlines, for more confidence in your divergence trade entries.
Additional information on the settings for this indicator can be found via the tooltips within the settings menu itself. Further information on feature updates, and usage tips & tricks will be added to the comments section below in due course.
Disclaimer: This indicator uses code adapted from the Divergence for Many v4 indicator authored by Lonesometheblue, and several stock indicators authored by Tradingview. With many thanks.
MTF Stoch RSI + Realtime DivergencesMulti-timeframe Stochastic RSI + Realtime Divergences + Alerts + Pivot lookback periods.
This version of the Stochastic RSI adds the following additional features to the stock UO by Tradingview:
- Optional 3 x Multiple-timeframe overbought and oversold signals, indicating where 3 selected timeframes are all overbought (>80) or all oversold (<20) at the same time, with alert option.
- Optional divergence lines drawn directly onto the oscillator in realtime, with alert options.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes, including the ability to enable automatic adjustment of pivot period per chart timeframe.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
- Indications where the Stoch RSI is crossing down from above the overbought threshold (<80) and crossing above the oversold threshold (>20) levels on a given user selected timeframe, by printing gold dots on the indicator.
- Also includes standard configurable Stoch RSI options, including k length, d length, RSI length, Stochastic length, and source type (close, hl2, etc)
While this version of the Stochastic RSI has the ability to draw divergences in realtime along with related settings and alerts so you can be notified as divergences occur without spending all day watching the charts, the main purpose of this indicator was to provide the triple multiple-timeframe overbought and oversold confluence signals and alerts, in an attempt to add more confluence, weight and reliability to the single timeframe overbought and oversold states, commonly used for trade entry confluence. It's primary purpose is intended for scalping on lower timeframes, typically between 1-15 minutes. The triple timeframe overbought can often indicate near term reversals to the downside, with the triple timeframe oversold often indicating neartime reversals to the upside. The default timeframes for this confluence are set to check the 1 minute, 5 minute, and 15 minute timeframes, ideal for scalping the < 15 minute charts.
The Stochastic RSI
The popular oscillator has been described as follows:
“The Stochastic RSI is an indicator used in technical analysis that ranges between zero and one (or zero and 100 on some charting platforms) and is created by applying the Stochastic oscillator formula to a set of relative strength index (RSI) values rather than to standard price data. Using RSI values within the Stochastic formula gives traders an idea of whether the current RSI value is overbought or oversold. The Stochastic RSI oscillator was developed to take advantage of both momentum indicators in order to create a more sensitive indicator that is attuned to a specific security's historical performance rather than a generalized analysis of price change.”
How do traders use overbought and oversold levels in their trading?
The oversold level, that is when the Stochastic RSI is above the 80 level is typically interpreted as being 'overbought', and below the 20 level is typically considered 'oversold'. Traders will often use the Stochastic RSI at an overbought level as a confluence for entry into a short position, and the Stochastic RSI at an oversold level as a confluence for an entry into a long position. These levels do not mean that price will necessarily reverse at those levels in a reliable way, however. This is why this version of the Stoch RSI employs the triple timeframe overbought and oversold confluence, in an attempt to add a more confluence and reliability to this usage of the Stoch RSI.
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose, and also when the triple timeframe overbought and oversold confluences occur.
Configurable pivot lookback values.
You can adjust the default pivot lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action. By default, this indicator has enabled the automatic adjustment of the pivot periods for 4 configurable timeframes, in a bid to optimise the divergences drawn when the indicator is loaded onto any of the 4 timeframes. These timeframes and the auto adjusted pivot periods on each of them can also be reconfigured within the settings menu.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock UO by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
Strength of Divergence Across Multiple IndicatorsOverview:
One-stop shop for all your divergence needs, including:
(1) A single metric for divergence strength across multiple indicators.
(2) Labels that make it easy to spot where the truly strong divergence is by showing the overall divergence strength value along with the number of divergent indicators. Hovering over the label shows a breakdown of each divergent indicator and its individual divergence strength value.
(3) Fully customizable, including inputs for pivot lengths, divergence types, and weights for every component of the divergence strength calculation. This allows you to quickly and easily optimize the output for any chart. Don't worry, the default settings will have you covered if you're not interested in what's going on under the hood.
The Divergence Strength Calculation:
The total divergence strength value is the sum of the divergence strengths of all indicators for which divergence was detected at a given bar. Each indicator's individual divergence strength is comprised of two basic components: (1) |ΔPrice| - the magnitude of the change in price over the divergence period (pivot-to-pivot), and (2) |ΔIndicator| - the magnitude of the change in indicator value over the divergence period.
Because different indicators' scales and volatility can vary greatly, the Δ values are expressed in terms of standard deviation to ensure that the values are meaningful and equitable across all indicators and assets/instruments/currency pairs, etc:
|ΔIndicator| = |indicator_value_1 - indicator_value_2| / 2 * StDev(indicator_series,100)
Calculation Weights:
All components of the calculation are weighted and can be modified on the Inputs page in settings (weights are simply multipliers). For example, if you think hidden divergence should carry less weight than regular divergence, you can assign it a lesser weight. Or if you think RSI divergence is worth more than OBV divergence, you can adjust their weights accordingly. List of weights:
Regular divergence weight - default = 1
Hidden divergence weight - default = 1
ΔPrice weight - default = 0.5 (multiplied by the ΔPrice component)
ΔIndicator weight - default = 1.5 (multiplied by the ΔIndicator component)
RSI weight - default = 1.1
OBV weight - default = 0.8
MACD weight - default = 0.9
STOCH weight - default = 0.9
Development for additional indicators is ongoing, as is research into the optimal weight configuration(s).
Other Inputs:
Pivot lengths - specify the number of bars before and after each pivot high/low to consider it a valid candidate for divergence.
Lookback bars and Lookback pivots - specify the number of bars or the number of pivots to look back across.
Price sources - specify separate price sources for bullish and bearish divergence
Display settings - specify how lines and labels should display, including which divergence strength values should show the largest labels. Include/exclude specific divergence types and indicators.
Please report any bugs, or let me know if you have any enhancement suggestions or requests for additional indicators.
@reees
Divergence Cheat Sheet'Divergence Cheat Sheet' helps in understanding what to look for when identifying divergences between price and an indicator. The strength of a divergence can be strong, medium, or weak. Divergences are always most effective when references prior peaks and on higher time frames. The most common indicators to identify divergences with are the Relative Strength Index (RSI) and the Moving average convergence divergence (MACD).
Regular Bull Divergence: Indicates underlying strength. Bears are exhausted. Warning of a possible trend direction change from a downtrend to an uptrend.
Hidden Bull Divergence: Indicates underlying strength. Good entry or re-entry. This occurs during retracements in an uptrend. Nice to see during the price retest of previous lows. “Buy the dips."
Regular Bear Divergence: Indicates underlying weakness. The bulls are exhausted. Warning of a possible trend direction change from an uptrend to a downtrend.
Hidden Bear Divergence: Indicates underlying weakness. Found during retracements in a downtrend. Nice to see during price retests of previous highs. “Sell the rallies.”
Divergences can have different strengths.
Strong Bull Divergence
Price: Lower Low
Indicator: Higher Low
Medium Bull Divergence
Price: Equal Low
Indicator: Higher Low
Weak Bull Divergence
Price: Lower Low
Indicator: Equal Low
Hidden Bull Divergence
Price: Higher Low
Indicator: Higher Low
Strong Bear Divergence
Price: Higher High
Indicator: Lower High
Medium Bear Divergence
Price: Equal High
Indicator: Lower High
Weak Bear Divergence
Price: Higher High
Indicator: Equal High
Hidden Bull Divergence
Price: Lower High
Indicator: Higher High
TALibrary "TA"
General technical analysis functions
div_bull(pS, iS, cp_length_after, cp_length_before, pivot_length, lookback, no_broken, pW, iW, hidW, regW)
Test for bullish divergence
Parameters:
pS : Price series (float)
iS : Indicator series (float)
cp_length_after : Bars after current (divergent) pivot low to be considered a valid pivot (optional int)
cp_length_before : Bars before current (divergent) pivot low to be considered a valid pivot (optional int)
pivot_length : Bars before and after prior pivot low to be considered valid pivot (optional int)
lookback : Bars back to search for prior pivot low (optional int)
no_broken : Flag to only consider divergence valid if the pivot-to-pivot trendline is unbroken (optional bool)
pW : Weight of change in price, used in degree of divergence calculation (optional float)
iW : Weight of change in indicator, used in degree of divergence calculation (optional float)
hidW : Weight of hidden divergence, used in degree of divergence calculation (optional float)
regW : Weight of regular divergence, used in degree of divergence calculation (optional float)
Returns:
flag = true if divergence exists (bool)
degree = degree (strength) of divergence (float)
type = 1 = regular, 2 = hidden (int)
lx1 = x coordinate 1 (int)
ly1 = y coordinate 1 (float)
lx2 = x coordinate 2 (int)
ly2 = y coordinate 2 (float)
div_bear(pS, iS, cp_length_after, cp_length_before, pivot_length, lookback, no_broken, pW, iW, hidW, regW)
Test for bearish divergence
Parameters:
pS : Price series (float)
iS : Indicator series (float)
cp_length_after : Bars after current (divergent) pivot high to be considered a valid pivot (optional int)
cp_length_before : Bars before current (divergent) pivot highto be considered a valid pivot (optional int)
pivot_length : Bars before and after prior pivot high to be considered valid pivot (optional int)
lookback : Bars back to search for prior pivot high (optional int)
no_broken : Flag to only consider divergence valid if the pivot-to-pivot trendline is unbroken (optional bool)
pW : Weight of change in price, used in degree of divergence calculation (optional float)
iW : Weight of change in indicator, used in degree of divergence calculation (optional float)
hidW : Weight of hidden divergence, used in degree of divergence calculation (optional float)
regW : Weight of regular divergence, used in degree of divergence calculation (optional float)
Returns:
flag = true if divergence exists (bool)
degree = degree (strength) of divergence (float)
type = 1 = regular, 2 = hidden (int)
lx1 = x coordinate 1 (int)
ly1 = y coordinate 1 (float)
lx2 = x coordinate 2 (int)
ly2 = y coordinate 2 (float)
Ultimate Oscillator + Realtime DivergencesUltimate Oscillator (UO) + Realtime Divergences + Alerts + Lookback periods.
This version of the Ultimate Oscillator adds the following 5 additional features to the stock UO by Tradingview:
- Optional divergence lines drawn directly onto the oscillator in realtime
- Configurable alerts to notify you when divergences occur, as well as centerline crossovers.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the UO has crossed the centerline, or optionally when both the UO and an external oscillator, which can be linked via the settings, have both crossed their centerlines.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the stock Ultimate Oscillator by Tradingview, whose core calculations remain unchanged. Namely the configurable option to automatically and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified as divergences occur without spending all day watching the charts. Furthermore, this version of the Ultimate Oscillator comes with configurable lookback periods, which can be configured in order to adjust the length of the divergences, in order to suit shorter or higher timeframe trading approaches.
The Ultimate Oscillator
Tradingview describes the Ultimate Oscillator as follows:
“The Ultimate Oscillator indicator (UO) indicator is a technical analysis tool used to measure momentum across three varying timeframes. The problem with many momentum oscillators is that after a rapid advance or decline in price, they can form false divergence trading signals. For example, after a rapid rise in price, a bearish divergence signal may present itself, however price continues to rise. The ultimate Oscillator attempts to correct this by using multiple timeframes in its calculation as opposed to just one timeframe which is what is used in most other momentum oscillators.”
More information on the history, use cases and calculations of the Ultimate Oscillator can be found here: www.tradingview.com
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable lookback values.
You can adjust the default lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock UO by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue.
True Strength Indicator + Realtime DivergencesTrue Strength Indicator (TSI) + Realtime Divergences + Alerts + Lookback periods.
This version of the True Strength Indicator adds the following 5 additional features to the stock TSI by Tradingview:
- Optional divergence lines drawn directly onto the oscillator in realtime.
- Configurable alerts to notify you when divergences occur, as well as when the TSI and lagline bands crossover one another, when the oscillator begins heading up, or heading down.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
- Background colouring option to indicate when the two TSI bands, the TSI line and the TSI lagline, have crossed one another, either moving upwards or downwards, or optionally when the two TSI bands have crossed upwards and an external oscillator, which can be linked via the settings, has crossed above its centerline, and the TSI bands have crossed downwards and the external oscillator has crossed below its centerline.
- Alternate timeframe feature allows you to configure the oscillator to use data from a different timeframe than the chart it is loaded on.
This indicator adds additional features onto the stock TSI by Tradingview, whose core calculations remain unchanged, although this version has different settings as default to suit a shorter time period (it uses 6, 13, 4 by default, whereas the stock TSI typically ships with higher values, e.g. 25, 13, 13). Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur in realtime. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the TSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
The True Strength Indicator
Tradingview describes the True Strength Indicator as follows:
“The True Strength Index (TSI) is a momentum oscillator that ranges between limits of -100 and +100 and has a base value of 0. Momentum is positive when the oscillator is positive (pointing to a bullish market bias) and vice versa. It was developed by William Blau and consists of 2 lines: the index line and an exponential moving average of the TSI, called the signal line. Traders may look for any of the following 5 types of conditions: overbought, oversold, centerline crossover, divergence and signal line crossover. The indicator is often used in combination with other signals..”
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable lookback values.
You can adjust the default lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis , meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level . A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer: This script includes code from the stock TSI by Tradingview as well as the Divergence for Many Indicators v4 by LonesomeTheBlue
RSI + MA, LinReg, ZZ (HH HL LH LL), Div, Ichi, MACD and TSI HistRelative Strength Index with Moving Average, Linear Regression, Zig Zag (Highs and Lows), Divergence, Ichimoku Cloud, Moving Average Convergence Divergence and True Strength Index Histogram
This script is based on zdmre's RSI script, I revamped a lot of things and added a few indicators from ParkF's RSI script.
Disable Labels in the Style tab and the histogram if you don't enlarge the indicator and it seems too small.
Look to buy in the oversold area and bounce of the support of the linear regression.
Look to sell in the overbought area and bounce of the resistance of the linear regression.
Look for retracement to the moving average or horizontal lines, and divergences for potential reversal.
RSI
The Relative Strength Index (RSI) is a well versed momentum based oscillator which is used to measure the speed (velocity) as well as the change (magnitude) of directional price movements.
Moving Average
Moving Average (MA) is a good way to gauge momentum as well as to confirm trends, and define areas of support and resistance.
Linear Regression
The Linear Regression indicator visualizes the general price trend of a specific part of the chart based on the Linear Regression calculation.
Zig Zag (Highs and Lows)
The Zig Zag indicator is used to identify price trends, and in doing so plots points on the chart to mark whenever prices reverse by a larger percentage point than a predetermined variable or marker.
Divergence
The divergence indicator warns traders and technical analysts of changes in a price trend, oftentimes that it is weakening or changing direction.
Ichimoku Cloud
The Ichimoku Cloud is a package of multiple technical indicators that signal support, resistance, market trend, and market momentum.
MACD and TSI Histogram
MACD can be used to identify aspects of a security's overall trend.
The True Strength Index indicator is a momentum oscillator designed to detect, confirm or visualize the strength of a trend.
Wolfpack Divergences [multigrain]█ OVERVIEW
A fast and improved divergence finding algorithm that aims to be better than the built-in TradingView divergence algorithm.
█ CONCEPTS
Wolfpack
Wolfpack is an oscillator made popular by darrellfischer1 all the way back in 2017. Since then the Wolfpack oscillator has been utilized by a number of notable strategy/indicator creators. At some point it was realized that the oscillator was simply the Moving Average Crossover Divergence oscillator with the fast and slow length of 3 and 8, respectively. The true significance and reasoning behind these lengths are unknown, however one may surmise that they are chosen due to their relevance as Fibonacci numbers.
Divergences
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
█ USAGE
Wolfpack
Similar to many other oscillators, when the Wolfpack oscillator reports a value above the zero-line, this indicates a bullish trend in the price. Subsequently, a value below the zero-line indicate a bearish trend in the price.
Divergences
Divergence in technical analysis may signal a major positive or negative price move. A positive divergence occurs when the price of an asset makes a new low while an indicator, such as money flow, starts to climb. Conversely, a negative divergence is when the price makes a new high but the indicator being analyzed makes a lower high.
Faytterro EstimatorWhat is Faytterro Estimator?
This indicator is an advanced moving average.
What it does?
This indicator is both a moving average and at the same time, it predicts the future values that the price may take based on the values it has taken before.
How it does it?
takes the weighted average of data of the selected length (reducing the weight from the middle to the ends). then draws a parabola through the last three values, creating a predicted line.
How to use it?
it is simple to use. You can use it both as a regression to review past prices, and to predict the future value of a price. uptrends are in green and downtrends are in red. color change indicates a possible trend change.
MACD DivergencesUpdate of MACD indicator which shows the most recent, and developing, price action divergences with the histogram.
Price Convergence DivergenceSimple Price convergence divergence. Current close minus past or in other words lagging price.
Divergence MACD Sign/Alert [MsF]MACD divergence sign & alert notification.
With this router, you can choose which further indicators you want to see divergence in MACD.
In addition, in order to improve visibility, the sub-window is designed to display only the selected index and diversity.
Lookback Bars: When detecting divergence, you can set how many bars to look back in the past.
--------------
MACDダイバージェンスのサイン&アラートインジケータです。
このインジケータでは、MACDの中でさらにどの指標のダイバージェンスを見るか選択できます。"MACD"、"Signal"、"ヒストグラム"の3つから選べます。
なお、サブウィンドウには可視性向上のため、選択した指標とダイバージェンスのみを表示する仕様としています。
■設定について
Lookback Bars:ダイバージェンス検出する場合に、何個のバーを過去にさかのぼるか設定できます。
Defu_DivergenceThis is a composite indicator, a collection of multiple indicators
It includes the following:
1. the gray background has a huge trading volume ,
2. the market cost deviates, and the relationship between the closing price of the black line, the red line and the blue line and the short-term, medium-term and long-term average. Compare the difference after mutual subtraction.
3. blue orange column fund flow indicator MFI , color transparency indicates the value
4. the Bollinger belt signals with a short deviation rate, which is the Bollinger belt with a black line.
======================The above translation is from Google
这是一个复合指标,集合了多种指标
包括以下:
1.灰色背景成交量巨大,
2.市场成本乖离 ,黑色线、红色线、蓝色线收盘价与 短期 、中期、长期三条均线之间的关系。互减后比较差值。
3.蓝橙柱 资金流量指标MFI,颜色的透明度表示值的大小
4.布林带 以短期乖离率信号,就是黑色线的布林带。
TSI + DivergencesTrue Strength Indicator (TSI) + Divergences + Alerts + Lookback periods.
This version of the True Strength Indicator adds the following 3 additional features to the stock TSI by Tradingview:
- Optional divergence lines drawn directly onto the oscillator.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
This indicator adds additional features onto the stock TSI by Tradingview, whose core calculations remain unchanged. Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur, with minimal delay. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the TSI comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
The True Strength Indicator
Tradingview describes the True Strength Indicator as follows:
“The True Strength Index (TSI) is a momentum oscillator that ranges between limits of -100 and +100 and has a base value of 0. Momentum is positive when the oscillator is positive (pointing to a bullish market bias) and vice versa. It was developed by William Blau and consists of 2 lines: the index line and an exponential moving average of the TSI, called the signal line. Traders may look for any of the following 5 types of conditions: overbought, oversold, centerline crossover, divergence and signal line crossover. The indicator is often used in combination with other signals..”
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences. Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable lookback values.
You can adjust the default lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis, meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level. A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer : This script includes code from the stock TSI by Tradingview as well as the RSI divergence indicator.
Ultimate Oscillator + DivergencesUltimate Oscillator (UO) + Divergences + Alerts + Lookback periods.
This version of the Ultimate Oscillator adds the following 3 additional features to the stock UO by Tradingview:
- Optional divergence lines drawn directly onto the oscillator.
- Configurable alerts to notify you when divergences occur.
- Configurable lookback periods to fine tune the divergences drawn in order to suit different trading styles and timeframes.
This indicator adds additional features onto the stock Ultimate Oscillator by Tradingview, whose core calculations remain unchanged. Namely the configurable option to automatically, quickly and clearly draw divergence lines onto the oscillator for you as they occur, with minimal delay. It also has the addition of unique alerts, so you can be notified when divergences occur without spending all day watching the charts. Furthermore, this version of the Ultimate Oscillator comes with configurable lookback periods, which can be configured in order to adjust the sensitivity of the divergences, in order to suit shorter or higher timeframe trading approaches.
The Ultimate Oscillator
Tradingview describes the Ultimate Oscillator as follows:
“The Ultimate Oscillator indicator (UO) indicator is a technical analysis tool used to measure momentum across three varying timeframes. The problem with many momentum oscillators is that after a rapid advance or decline in price, they can form false divergence trading signals. For example, after a rapid rise in price, a bearish divergence signal may present itself, however price continues to rise. The ultimate Oscillator attempts to correct this by using multiple timeframes in its calculation as opposed to just one timeframe which is what is used in most other momentum oscillators.”
More information on the history, use cases and calculations of the Ultimate Oscillator can be found here: www.tradingview.com
What are divergences?
Divergence is when the price of an asset is moving in the opposite direction of a technical indicator, such as an oscillator, or is moving contrary to other data. Divergence warns that the current price trend may be weakening, and in some cases may lead to the price changing direction.
There are 4 main types of divergence, which are split into 2 categories;
regular divergences and hidden divergences . Regular divergences indicate possible trend reversals, and hidden divergences indicate possible trend continuation.
Regular bullish divergence: An indication of a potential trend reversal, from the current downtrend, to an uptrend.
Regular bearish divergence: An indication of a potential trend reversal, from the current uptrend, to a downtrend.
Hidden bullish divergence: An indication of a potential uptrend continuation.
Hidden bearish divergence: An indication of a potential downtrend continuation.
Setting alerts.
With this indicator you can set alerts to notify you when any/all of the above types of divergences occur, on any chart timeframe you choose.
Configurable lookback values.
You can adjust the default lookback values to suit your prefered trading style and timeframe. If you like to trade a shorter time frame, lowering the default lookback values will make the divergences drawn more sensitive to short term price action.
How do traders use divergences in their trading?
A divergence is considered a leading indicator in technical analysis, meaning it has the ability to indicate a potential price move in the short term future.
Hidden bullish and hidden bearish divergences, which indicate a potential continuation of the current trend are sometimes considered a good place for traders to begin, since trend continuation occurs more frequently than reversals, or trend changes.
When trading regular bullish divergences and regular bearish divergences, which are indications of a trend reversal, the probability of it doing so may increase when these occur at a strong support or resistance level. A common mistake new traders make is to get into a regular divergence trade too early, assuming it will immediately reverse, but these can continue to form for some time before the trend eventually changes, by using forms of support or resistance as an added confluence, such as when price reaches a moving average, the success rate when trading these patterns may increase.
Typically, traders will manually draw lines across the swing highs and swing lows of both the price chart and the oscillator to see whether they appear to present a divergence, this indicator will draw them for you, quickly and clearly, and can notify you when they occur.
Disclaimer : This script includes code from the stock UO by Tradingview as well as the RSI divergence indicator.
Jurik Smoothed Stochastic - TraderHalaiJurik Smoothed Stochastic
The stochastic indicator has been long used by traders to identify inflection points in the price and to give a direction on Bullish and Bearish bias.
This indicator aims to improve on the plots the %K value smoothed using a Jurik Filter instead of a simple moving average. This allows for a more adaptive K value average price, whilst also providing superior smoothing to traditional moving averages.
As the Jurik Filter is a proprietary and non-open-source implementation, this script uses a common filters library implementation of Jurik MA which is a suitable proxy to the actual Jurik MA filter.
Big thanks to LastGuru for making his version freely available. You can find his version of the Jurik Filters in the credits section below.
%K is the Jurik Smoothed Version of the original Stochastic Formula
%D is calculated using the following formula. This idea was borrowed from John Ehler’s stochastic implementation and can be seen below:
%D = 0.05 + 0.95 * K
Features
%K line, Overbought and Oversold level and Mid Line Level
Oversold / Overbought reversal indicators and signals - Shown in Red and Green
Bullish / Bearish Divergences – Including Hidden divergences to spot reversals and continuations of trend (Big thanks to the developers of the built-in RSI Divergence indicator) - Shown as below:
Bullish / Bearish crossover of %K with %D - Shown in Cyan and Fuschia
Alerts for all of the above conditions
Double Jurik smoothing mode - similar to slow Stochastic
Credits :
Massive shoutout to the following scripts:
LastGuru JurikMA implementation (Common Filters Library)
Divergence Indicator – Built into TradingView and coded by TradingView Developers
This script is published as open source to allow for criticism, further development of this strategy and use by the community. Feel free to use this indicator/source code as you see fit.
Enjoy! :)
RSI Potential Divergence - FontiramisuIndicator showing potential momentum divergences on RSI Momentum.
The problem with the classic divergence is that when the signal appears, it is sometimes too late to enter a trade.
The potential divergence corrects this problem by signaling the beginning of a potential divergence.
RSI is a momentum indicator that offers relevant insights with divergences.
Potential divergences are indicated with the letter B and a red color for Bearish Div or Green color for Bullish Div .
Potential divergence is confirmed when the line and the label "Bear"' or "Bull" appear.
MA SLope Potential Divergence - FontiramisuIndicator showing potential momentum divergences on Moving Average's Slope.
The problem with the classic divergence is that when the signal appears, it is sometimes too late to enter a trade .
The potential divergence corrects this problem by signaling the beginning of a potential divergence .
Moving average slope is a momentum indicator that offers relevant insights with divergences
Potential divergences are indicated with the letter B and a red color for Bearish Div or Green color for Bullish Div .
Potential divergence is confirmed when the line and the label "Bear"' or "Bull" appear.
You can either show fast slope's divergences or slow slope's divergences or slow/fast diff's divergences.
RSI PacingThe RSI Pacing indicator compares the movement of the RSI directly with the movement of the asset to help identify divergences.
Bullish Divergences
The RSI is increasing at a greater rate than the pace of the asset.
The RSI is decreasing at a lesser rate than the pace of the asset.
Bearish Divergences
The RSI is decreasing at a greater rate than the pace of the asset.
The RSI is increasing at a lesser rate than the pace of the asset.
Warning: Does not yet work on higher timeframes yet. Working on getting the pace normalized to the RSI's bounds.
OBV with Volume/Momentum DivergenceCredits go to vyperphi696 and LazyBear for the original OBV with Divergence script.
This indicator has the new option to check for momentum divergence, which I have done by adding RSI and MACD data.
Hence the indicator allows combined testing of volume and momentum divergence. This feature aims to improve trend reversal detection by reducing false positives.
In summary, 3 divergence categories are shown by default as lines:
Volume + RSI + MACD (dark green/red)
Volume + RSI / Volume + MACD (light green/red)
Volume (gray)
Line colors can be adjusted via plot settings. Therefore it is also possible to distinguish Volume + RSI and Volume + MACD divergence if necessary.
Lastly, I edited the indicator scaling mechanism when changing from one timeframe to another; the transitions are smoother now. This only applies when auto-scaling is off.
PSS Divergence RSIThe objective of the script is to identify the divergences (positive / negative) and visualize them as an indicator to easily spot the possible trend change.
Ingredients -
a. 34 period RSI at current candle
b. 34 period RSI at 21 candles back
c. 5 EMA of a
d. 5 EMA of b
e. 5 EMA of current candle
f. 5 EMA of 21 candles back
Description -
The indicator is designed for scalping and to smooth-out the noise in shorter timeframe (1 min), bigger period (34) is used for RSI calculation.
The core idea of divergence is to look at RSI movement in relation to price movement, hence a ratios are created for RSI value relative to it's price.
R1 = rsiMA1*100/priceMA1
R2 = rsiMA2*100/priceMA2
Some mathematics is applied over the calculated ratios to determine if there is bullish or bearish divergence -
Div = (R1-R2)*100/(R1+R2)
The reasoning to apply 5 EMA to price as well as RSI is to compare areas (5 candles) instead of single point comparison for better insights.
The value above zero line is considered positive divergence and below zero line is negative divergence.
Recommended to combine with Pivot Points, Fibonacci or Gann levels as confirmation to enter the trade.
Reviews / feedbacks are most welcome !
Prasad Shenwai
prasad.s.shenwai@gmail.com