Divergence Indicator with alertsFirst time I've published a script so go easy!
All credit goes to @yatrader2 for the script, I have just made it easier to set alerts on it.
Enjoy!
Divergences
BOSCILLATOR. A BOSS OSCILLATORI would like to first say I do not the indicator pieces. Would like to personally give thanks and credit to @MarkBench for coding this indicator and helping to get my vision for this system finally able to be published and used by anyone. I would also like the thank @lazy bear and @ChrisMoody for their bringing the Firefly oscillator and the SCHAFF TREND and the PPO price percentage oscillator to trading view. and @scilentor for his version of Godmode with LSMA . Thanks to @Shizaru for bringing Frama moving average (which we have adopted into the PPO as one of the base selections for the first time, as well as the ALMA ). Divergences have also been added. and components of the firefly have been removed such as the histogram. I have added two oscillators in the picture. The bottom is the standard settings. The above is how I prefer mine to look after tweaking the settings.
Before I get into explaining how its used. I want to say all the indicators are open and none privately owned or at least owned by indivduals who brought them to trading view. Any due permission is granted at my disclocsure. I also want to say this is not your typical mashup of indicators as the is a very clear way to view and use this specifically. Also I want to say original tools from their original scripts are also improved. For example the PPO being used we have added the FRAMA and ALMA moving average basis option which it did not have before. And now everything has clear divergences and some other minor changers. but here are the rules and examples.
THE BOSCILLATOR - A MULTI-LEVEL CONFLUENCE/CONFIRMATION FILTER VISUALIZATION
Some shorthand
(Main oscillator - firefly)
(background wave thing - PPO )
(the red vertical up and down line with red and green dots - STC )
(the blue, yellow and red dots - warning dots)
WHO IS THIS INDICATOR FOR? - This indicator itself is not meant to be a signal giver to buy or sell right now even though it could be and some of the original scripts are used as such. This indicator is actually meant to be a VISUAL CONFIRMATION & FILTER for trades taken in other methods outside of this indicator. What are some of those methods that may benefit from having this? Pivot point traders, FIB traders, Bollinger band traders, Moving average traders.. just to name a few. This indicator itself is meant to in a quick glance allow the trade to see the condition of many different elements outside of the main price and chart, and determine if that trade looks like it has too much risk, or if that trade looks suitable. It also provides a series of confirmations that could be used for adding to a position at different levels at the trade's discretion.
OPTIMAL CONDITIONS FOR CONSIDERING A SHORT = The PPO is orange/red + the STC is at the TOP + the Firefly is above the midline. The warning dots are being printed at the top. There is regular or hidden bearish divergence present.
OPTIMAL CONDITIONS FOR CONSIDERING A LONG = The PPO is light/dark green + the STC is at the BOTTOM + the Firefly is below the midline. The warning dots are being printed at the bottom. There is regular or hidden bullish divergence present.
Triggers for scaling/adding into your position = Keeping in mind that this oscillator on its own is not meant to be the sole reason for taking a trade, here are some triggers you will see for getting into position (preferably with the optimal conditions being met) The firefly flips from a green line into a red slide and vise versa. The firefly crosses the midline up or down. The STC begins going up/down and triggers a green or red dot while crossing one of the levels at 20 or 80. The warning dots being made begin to be printed lower/higher than the dot before last. The PPO shift from one color to the next in the favored direction of the trade you wish to make.
Signs for taking profit and protecting your trade = The Dots begin to print, the PPO changes colors at the top or bottom. the STC arrived are the top.
FILTER SITUATIONS TO AVOID TRADES = Wise to not take a trade if the PPO and the firefly do not agree. For example - if the PPO is showing green yet the firefly is still red may be an indication that it is getting a bit late for you to enter the trade. Same with opposing divergences and warning dots contradicting the trade you are looking at. The STC being already on the bottom or top may be a small indication that trade may already have been a little too ripe, but on its own is not always the case.
When selecting the PPO settings and moving average you are going to want it to be in favor of what you are trying to accomplish.IF you are one low time frames and trying to swing or scalp trade... chances are you want a reactive MA setting that iss responsive. Iwould recommend the HULL, ALMA, TEMA DEMA. For the Higher time frame the EMA or the T3 WDma can be wuite patient and helpful for a constant reminder of caution
Some notes - for the swing and scalp trading... in my experience the PPO moving average basis sees more responsive changes with the FRAMA , ALMA , HULL settings. for entering a trade, at least a couple of your triggers being present increases the success rate by a lot.
This chart illustrates the usefullness of having a Zero lag function for the firefly. The firefly should not be taken for signals or trades itself. However it is the most precise finder of divergences within the system. It is aways good to flip on and off zero lag just to take a quick look for divergences you might have mixed.
In this chart illustrates the general visual look and order of events to guide you along your way. Starts with the PPO turning green or red or orange which is potentially time to get out of your current trade. Then it switched colors when reversal begins and that is when you want to at the same time see the STC, the firefly, and lower caution dots coming in around the same area (highlighted in blue squares). Now near the end you see a red box. This is a filter aspect. The PPO is green, yet the others are saying down/short. This does not mean it must be a long, however it is great warning to maybe avoid getting to bearish for the downside in that time. You want the PPO and line up with the others and it should be visually apparent that they all want to go the same way.
Here is a list of some key elements (before changes this script made) of parts this oscillator includes. My original publication of my oscillation setup was blocked by the mods here.. this one however includes a large variety of items that have been altered from their original formats and a well-explained trading system to use it with.
// Firefly
Firefly Oscillator
// PPO
PPO PercentileRank Mkt Tops & Bottoms (@PuppyTherapy)
// Divergence
Divergence Indicator (any oscillator)
// Godmode
Godmode3.2+LSMA
// Schaff
Schaff Trend Cycle
// Frama
(FRAMA) Fractal Adaptive Moving Average
Composite Index Divergence IndicatorComposite Index by Constance Brown mixed with built-ins Divergence Indicator
useful indicator to find divergence
this script find divergence automatically for you
Triangular Momentum Oscillator & Real Time Divergences [LuxAlgo]Oscillators are widely used in technical analysis and can return a large amount of information to the trader depending on their design. It is common to use oscillators to detect divergences with the price, divergences occur when the tops/bottoms made by the oscillator and price are negatively correlated.
The following oscillator is based on the momentum of a triangular moving average, hence the name "triangular momentum" because of the very smooth property of the triangular moving average, we aimed at a real-time detection of divergences instead of using more common methods such as relying on pivot high/low detection which are suitable for more noisy oscillators.
The oscillator can also be colored based on a gradient derived from the correlation between its output and the price which can be useful to detect when the oscillator is out of phase (significantly lagging or leading the price).
Settings
length : Period of the oscillator, higher values return a smoother output.
src : Input source of the indicator.
Show Lines : Show lines connecting the current top/bottom with the previous one made by the oscillator when a divergence is detected. True by default.
Color Based On Price/Oscillator Correlation : Allows the color of the oscillator to change based on its correlation with the price, with red colors suggesting a negative correlation.
Usages
The advantage of having a smoother oscillator for divergences detection is that it can be done in real-time since a top or bottom is present when the oscillator first difference cross 0. Smoother oscillators are also easier to interpret, however, they will still suffer from lag.
The divergences detected by the oscillator are regular divergences, where the oscillator leads price variations.
Using higher values of length allows the oscillator to filter out longer-term variations thus being smoother as a result.
By using the color mode based on the price/oscillator correlation we can see where the oscillator leads or lag the price, and since divergences are based on the price and oscillator going in the opposite direction we can have information where price might reverse.
It is also possible to interpret the oscillator without relying on the divergence detection, with a decreasing value of the oscillator indicating a downtrend and an increasing value indicating an uptrend.
Divergence Indicator (any oscillator)A modification of the TV builtin "Divergence indicator" (Version 10) that can be applied to any indicator, and can be plotted on price as well.
Usage:
Add your favorite oscillator, RSI, Klinger, TSI, CMF, or anything else to a chart.
Click the little ... (More) on the oscillator.
Then add this indicator "Divergence Indicator (any oscillator)" on your oscillator of choice.
Click the settings on this indicator and make sure the source is set to the right plot from your oscillator.
Watch for it to plot divergences...
Add this indicator a second time on the price chart (and select the same oscillator plot), but check the box "plot on price (rather than on indicator)""
See you divergence plotted on price (as well as on the oscillator)
Elder EMA, ATR & MACD Indicator, 5X Time Frame & Divergences.This indicator is elaborated following the 3 window strategy described by Elder.
The fast, slow averages and MACD histogram are taken from a time frame 5 times higher than the active time frame and indicate bullish / bearish trends as well as divergences (bottom) of the hostogram with the price.
Divergence Histogram for Many IndicatorHello Traders,
This script analyses divergences for 11 predefined indicators and then draws column on the graph. Red columns for negatif divergence (means prices may go down or trend reversal), Lime columns for positive divergences (means prices may go up or trend reversal)
The script uses Pivot Points and on each bar it checks divergence between last Pivot Point and current High/Low and if it finds any divergence then immediately draws column. There is no Latency/Lag.
There are predefined 11 indicators in the script, which are RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, Diosc, VWMACD, CMF and MFI.
Smaller Pivot Point Period check smaller areas and if you use smaller numbers it would be more sensitive and may give alerts very often. So you should set it accordingly.
There is "Check Cut-Through in indicators" option, I recomment you to enable it. it checks that there is cut-through in indicators or not, if no cut-through then it's shown as valid divergence.
You should see following one as well if you haven't yet:
Enjoy!
Modified OBV w/ Divergence Detection by CryptorhythmsApirine OBV-M Modified OBV w/ MA Selection by Cryptorhythms
Intro
Released in the April 2020 issue of TASC, and created by Vitali Apirine.
Description
OBV-M is of course based on the classic indicator on balance volume originally developed by Joe Granville. Apirine then smooths the calculation and adds a signal line to help denote entry and exit points.
As the author points out uts also great at showing divergences!
Extras
As usual when porting indicators to the library here on tradingview, I like to add some extra flare!
💠MA selection to allow you to experiment with alternate settings
💠Bar coloration based on trade state for easy visual at a glance chart checking
💠Divergence Detection and plotting thanks for Ricardo Santos' script
Enjoy!
👍 We hope you enjoyed this indicator and find it useful! We post free crypto analysis, strategies and indicators regularly. This is our 78th script on Tradingview!
BEST RSI Divergences ScreenerHello traders
I hope you're all hanging on at home with what's going on these days...
The good news is.... it gives us more time to trade ^^.... #positive #attitude
I - Concept
This screener detects whether the regular RSI divergences based on the TradingView Divergence built-in indicator (made by the gentleman @everget I believe)
With this screener, you can see in 1 view which of your favorite cryptos/stocks/forex pairs/etc. showing strong divergences
The gentlemen (and demoiselles) traders can play with the lookback/ranges inputs to adjust the divergences based on what they think is best of their trading/timeframe/instrument/life
On that script screenshot, I'm showing the BYBIT:BTCUSD part of the screener matching with the divergences on the chart
II - How did I set the screener
The visual signals are as follow:
- square: whenever a divergence is detected
Then the colors are:
- green when there is bullish regular divergence
- red when there is bearish regular divergence
Best regards
Dave
RSI + DivergencesHi Guys,
This indicator gives you the trend changes (Designed with the basics of Vash's RSI advanced and the Fikira divergence indicator)
This indicator will only give you regular divergences.
Please keep in mind that a trading plan is not only built with momentum but also with location and structure.
Good trading,
Multiple divergences NON-REPAINT by PeterODivergences are well-known tool for finding trend reversals. Powerful, yet... unreliable. Sometimes they show up, sometimes they don't. Sometimes they really mean trend end, sometimes the trend continues. I've witnessed countless discussions about which indicator to hunt for divergences on. All pointless.
Earlier today I found a very inspirational script by Lonesometheblue, combining multiple divergences together. Actually - summing them up and showing hunted divergences count in a label. Because if a divergence shows up on a single indicator like RSI, it can indeed mean trend reversal, but... yeah, check previous pargraph. But if this divergence shows up on 8 different indicators at the same time, then chances increase, don't they?
I decided to do my own version of Lonesome's indicator, because that one is using Label.New, which doesn't allow analysing entire script, only latest 50 occurences or so. I'm not going to hide it - I copy-pasted a lot from Lonesome's code. And from Everget's built-in divergences script, which you can find in PineScript/New. I didn't even bother to modify variable names or cover tracks in any other way, pretending it is my work from scratch. All with these two gentlemen consent and blessing. I added labels from myself, plus bit of rework and here it is:)
I hope you'll find it useful.
P.S. While analyzing divergences today, I discovered one thing. Hidden divergences are not useless, as many people think. But they should be used at trend dips to join the trend, not at trend ends, as reversals. Experiment yourself.
P.S.2 Still, never use only divergences. They need confirmation, they are not self-fulfilling prophecy.
[e2] Reflex & TrendflexNew Indicator from John F. Ehlers issued in the February 2020 Technical Analysis of Stocks and Commodities article "Reflex: A New Zero-Lag Indicator"
This indicator includes both studies described in the article and intend to significantly reduce the lag of the signal compared to other oscillators.
Reflex for the cycle component and is more sensitive to major reversals, Trendflex for the trend component.
Pivot Max range as the borders for top and bottom reading of the indicators (the script will plot separate borders for both components) and divergences were added.
Divergence function is the interpretation of built-in divergence script, optimized the code and added option to show real-time divs (without offset), all credits to ...)
daily*tip: I must say that very quickly I began to realize how fragmented and imperfectly modern economic knowledge is and how little can be taken from fundamental science in terms of practical recipes. (c) Andrey Movchans.
stay safe ;)
[fikira] Divergences (RSI)This script can be used with candlesticks, accompanied with " RSI + Divergences"
The calculation is different than my "Divergences (Pivots)"
Thank you!
[fikira] MACD & RSI+Stoch + DivergencesThis is a new version of my "Divergences"
Compared to my "Divergences (Pivots)", this is calculated totally different
There are 3 options:
- MACD
- RSI
- Stoch RSI
Since this script is very heavy in calculation it is limited in time (= inspired from a script of "Che_Trader")
Also it uses "max_bars_back" (=1000)
For MACD and Stoch RSI there is a "custom Divergences Period", which compares more then 7 Pivot Points,
the higher the number, the less reliable, it is not necessary to use this, but it is there,
also you can change the "leftbars" and "rightbars", again, it is not necessary to change, but you can...
Linewidth and style of the Divergences lines can be changed
Thank you!
BEST Currency Strength Indicator DivergenceHello traders
Hope you had a great Thanksgiving
Now it's my turn to give and all I ask in return is you to be thankful (did I get the "Thanksgiving" thing right?)
The Currency Strength Indicator plots an average of the selected FX pairs in the indicator.
Someone asked me if I could develop an alternative of that script adding a divergence component.
The script evaluates the divergences between the average of the selected RSI(FOREX pairs) and the RSI(FOREX pair) displayed on the chart.
This version includes new features such as:
- the RSI length can now be selected
- we can select the 6 pairs used for the divergence calculations
All the BEST my aspiring traders and quants
See you tomorrow for another script
Dave
OBV Divergence +This study Plots Divergences for OBV along with 2 MA's
Choose between standard type of OBV and OBV Accumulation / Distribution thanks to spacetrader which seems to be a truer reading
Divergence Alerts are provided so that you dont have to stare at your screen all day
RSX-D [ID: AC-P]The "AC-P" version of Jaggedsoft's RSX Divergence and Everget's RSX script is my personal customized version of RSX with the following additions and modifications:
LSMA-D line that averages in three LSMA components to form a composite, the LSMA-D line. Offset for the LSMA-D line is set to -2 to offset latency from averaging togther the LSMA components to form a composite - recommended to adjust to your timeframe and asset/pair accordingly.
Divergence component from JustUncle, RicardoSantos, and Neobutane divergence scripts
Crossover indication and alerts for Midline, and custom M1 and M2 levels for both RSX and the LSMA-D line from Daveatt's CCI Stochastic Script
EMA21/55 zone cross highlighting option
SMA9/EMA45 MA option from my RSI sma/ema Cu script
Libertus Divergences and Pivot labels from Jaggedsoft's RSX Divergence script are hidden/off by default
Designed for darkmode by default. Minor visual changes from Jaggedsoft's and Everget's script(s) for darkmode and visual aesthetic.
Please Note:
Divergences that use fractal-based detection logic, offset, or a combination of both generally have a 1-2 bar/candle lag. This is an INHERENT limitation of divergence detection with fractals and offsets. Divergences generally will have a higher strikerate on HTF than LTF due to the 1-2 bar lag. While I'm not going to rule out a programming solution or math construct/formula that attempts to alleivates the 1-2 bar lag for divergences, this script is not it - please keep that in mind when using divergence components with a fractal base and offset.
LSMA-D is a composite of three LSMA lines, all with offset options. Different lengths and Offset values can compensate/adjust for the smoothing/latency from RSX, but only up to a certain point. For each LSMA, the least square regression line is calculated for the previous time periods, so the idea is that with finely tuned adjustments, you can get crossover/crossunder signals from the RSX with the LSMA-D line that you simply can't get with the SMA9/EMA45 due to the already smoothed RSX.
The defaults for the RSX and various components for the LSMA-D here will MOSTLY LIKELY NOT WORK OR BE APPLICABLE to every timeframe and asset that you trade - adjust, backtest, and test accordingly. The defaults are here are MEANT to be adjusted to the asset class and timeframe that you are trading.
If you're not familiar with the LSMA, tradingview author Alexgrover has a few great scripts that go into detail how the LSMA works, in addition to different interpretations and implementations of the LSMA.
References/Acknowledgements:
//@version=4
// Copyright (c) 2019-present, Alex Orekhov (everget)
// Jurik RSX script may be freely distributed under the MIT license.
//
//-------------------------------------------------------------------
// Acknowledgements:
//---- Base script:
// RSX Divergence — SharkCIA by Jaggedsoft
//
// Jurik Moving Average by Everget
//
//---- Divergences/Signals:
// Libertus RSI Divergences
//
// Price Divergence Dectector V3 by JustUncle
//
// Price Divergence Detector V2 by RicardoSantos
//
// Stochastic RSI with Divergences by Neobutane
//
// CCI Stochastic by Daveatt
//
//---- Misc. Reference:
// RSI SMA/EMA Cu by Auroagwei
//
// CBCI Cu by Auroagwei
//
// Chop and explode by fhenry0331
//
// T-Step LSMA by RafaelZioni
//
// Scripts by Jaggedsoft for structure and formatting
// Scripts by Everget for structure and formatting
//-------------------------------------------------------------------
// RSX-D v08
// Author: Auroagwei
// www.tradingview.com
//-------------------------------------------------------------------
Divergences multi timeframeMT div monitor, add your own input for divs under expressions. Add them to the original bulldivs or beardivs with +. Set div_threshold in inputs.
RepulseThis indicator was originally developed by Eric Lefort, a professional trader and author from France.
It gauges and displays the bullish or bearish pressure.
Like and follow for more open source indicators!
Happy Trading!
Relative Strength Index - Divergences - LibertusHello all,
To ease everyone's trading experience I made this script which colors RSI overbought and oversold conditions and as a bonus displays bullish or bearish divergences in last 50 candles (by default, you can change it).
Script is open source, part of code is from Trading View examples. If you have suggestions or you already made some improvements, please report in comment.
Happy trading and good luck!
Stochastic RSI with DivergencesTook my other Log RSI script and plugged in Stochastic RSI to see how divergences play on an oscillator with two lines. Turns out divergences are good at predicting changes in the oscillator but that doesn't mean that the oscillator will always mimic price action.
Log vs. no log is virtually the same.
Credits to
@fskrypt for introducing geometric mean
Divergences by @RicardoSantos (@JustUncleL's edit)
Fisher Transform Ribbons Indicator V1.0Utilizing the Fisher Transform by Ehlers with different lengths based on multipliers will allow you to notice movements in price and understand whether the shift was a correctional wave, or part of the overall trend.
To learn about Fisher Transform , check out the Fisher Transform documentation: www.mesasoftware.com
Fisher has plenty of functionalities. Ribbons provides you with a view of consistency in price action. If all ribbons flip, generally this is a strong signal that the trend is changing. Fisher is extremely punctual (minimum input lag) and robust (doesn't miss movement). Look for everything, including divergences, trends, and Oversold, Overbought points.
Changing length will further provide you more sensitivity in overselling and buying, while numbing chop.
Enjoy!
And for a single Fisher, check out HPotter's Fisher Transform or LazyBear's implementation of the inverse of the Fisher, which has many other interesting properties
Bats Bearish Divergence Detector (BRED-)After the release of BUBD+ here comes BRED- for calling the tops.
6 indicators are tested for the presence of any bearish Divergences and are plotted on chart as soon as they are.
Note - Price can move up after bearish divergence as well so its not foolproof. However multiple bearish divergences signify that bulls are losing power and price might reverse downwards.
Instead of blindly trusting the divergence on this indicator I suggest that you use this as a tracking mechanism instead. Once you spot a bearish divergence here, go to the oscillator that was called by the indicator and see the strength of the divergence involved.
This way you dont have to look at the indicators for divergence all the time, just only when the indicator calls for it. (Note that different timeframes will have different divergences so make sure you watch most of them. Higher timeframes indicate larger potential reversals)
Colour -
MACD- Aqua blue
RSI - Red
Stoch RSI - pink
CCI - Orange
MFI - Teal (Blue)
RVI - Silver
If you want to change the number of indicators you can do so from the bottom and remove the indicators you dont want to see by commenting them out.