The Divergent

Automated divergence detection with unparalleled customizability for any market on TradingView.


The most customizable and feature packed divergence indicator on TradingView
Divergence detection for any market & any timeframe

Do you scalp cryptocurrencies? Swing trade Forex? Perhaps you are a long term stock investor? Not a problem. The Divergent can alert you of the presence of divergences on any market and any timeframe.

Choose from several built-in oscillators

Do you have your favorite oscillator to detect divergences on? We've got you covered. The Divergent comes with 9 oscillators out of the box: MACD, RSI, CMF*, Stochastic RSI*, MFI*, TCI (WaveTrend)*, Balance of Power*, CCI* and the Awesome Oscillator*.
*: Pro feature

All types of divergences supported

The Divergent will alert you of any of the four divergences that present itself on your chart: Regular Bullish, Hidden Bullish*, Regular Bearish and Hidden Bearish*. You are free to cherry pick the ones you are interested in.
*: Pro feature

You have complete control over every aspect of divergence detection

Do you normally draw your divergence lines on the wicks of the candles? Perhaps on the candle bodies? Do you think a divergence is only valid if the line connecting the candles is continuous and uninterrupted? You can customise all of this, plus a lot more, using the 20+ configuration options available in the indicator settings. When fully configured, The Divergent will only signal those divergences that you personally think it is worth paying attention to.

Ready to be integrated into strategies (Pro feature)

Are you a Pine Script developer who wishes to use divergences as one of the entry condition in your own strategies? Look no further. The Divergent can be used as a DaaS (Divergence as a Service)! Just add The Divergent onto the same chart as your strategy, add an input with "input.source" to the strategy code, and select the "Divergence Signal" as the input's source. Every time a divergence is detected, your strategy will receive a signal, so you can have your long entries only be made if there was a Regular Bullish divergence detected recently!

Divergence statistics

The Divergent comes with a built in widget that shows you various statistics about the detected pivots and divergences, like the number of detected divergences in a given period, or how many times a divergence correctly predicted a change in price. You can use these numbers as a feedback when tweaking the indicator to give you the best possible signal.

Divergence lines on both the price and the oscillator
(Pro feature)

The Divergent comes with a companion indicator, which can be used to display divergence lines and labels on the price chart itself. The two indicators are linked together in an innovative way, which means you only have to configure one indicator (The Divergent); the companion indicator will automatically reconfigure itself and draw the lines on the correct candles.

Divergence quality control
(Pro feature)

With divergence verification enabled, The Divergent will tell you how many times a particular divergence "worked out", i.e. how many times a bullish or bearish divergence has actually resulted in the change in price in the direction predicted by the divergence. You can configure the price % levels which is used to categorise the divergences as winners or losers.

Fully documented

The Divergent has over 25 options available to tweak, and each of them comes with a mini documentation built inside the indicator, so that you can make an informed decision whether something is worth enabling or not. If you don't find an answer in the tooltips, you will appreciate the fact that The Divergent also comes with a 45+ page PDF document, where the inner workings of the indicator is explained in great detail.


A divergence occurs when the price and an oscillator moves in different direction.

For example, normally an oscillator (such as the RSI) will move the same direction as the price (i.e. if the price makes a lower high, the RSI will follow and also make a lower high). If however the price makes a higher high, yet the oscillator makes a lower high, that's a divergence (Regular Bearish). It is called a "divergence" because the price and the oscillator "diverged". The idea is that whenever a divergence occurs, that MAY be a signal of the price changing direction (regular divergences), or continuing in the same direction (hidden divergences).

The four different divergences that are supported by the indicator are:

1. Regular Bullish (when price makes a lower low, but the oscillator makes a higher low)
2. Hidden Bullish (when price makes a higher low, but the oscillator makes a lower low)
3. Regular Bearish (when price makes a higher high, but the oscillator makes a lower high)
4. Hidden Bearish (when price makes a lower high, but the oscillator makes a higher high)

To learn more about divergences, we invite you to read BabyPip's article on the subject.

Yes and no, depending on how you configure divergence detection.

Generally speaking, divergences are meant to be searched for whenever the price or the oscillator makes a new pivot (i.e. a swing low or a swing high). Once a new pivot forms, you look at the previous pivot(s) on both the price and the oscillator, and see if you can spot a divergence. While this is normally the best way for spotting for divergences, this results in them only being confirmed several bars after they manifest. Why? To understand this, we first need to look at how a pivots are identified on the chart.

When a new candle forms on the chart (let's call it P), how do you know if it is going to be the next pivot? You wait. At this point you simply don't know if the candles following P will make P look like a pivot. Once a new candle forms to the right of P, you need to look at two things:

1. Do the candles that come before P are all lower than P?
2. Do the candles that come after P (in this case just this one candle so far) are all lower than P?

If the answer is yes to both of these questions, you may start to suspect that P is indeed becoming the new pivot (high in this example). Can you however be 100% sure that the next candle will also stay lower than P? No you can't. It could be that the 2nd candle forming to the right of P is actually going to close higher than P. Would this immediately invalidate your theory that P is becoming the next pivot? Yes it certainly would. Using only a single candle to the right of P as a way to confirm it being a pivot is generally not a good idea. How many candle should you wait then? There is no right answer here, however it can be said that the more candles you wait for to form, the more likely you are going to correctly identify P being pivot.

So the more candles you wait to form to confirm a pivot, the higher your detection accuracy will be, but at the same time the slower your pivot identification process becomes. If you think that 4 candles forming after P is good enough for you to confirm it being a pivot - great, but this also means that your divergences will only be signalled once P has been confirmed as a pivot, which is 4 candles after P. On a 5 minutes chart it means your divergence alert will come 20 minutes (4 x 5 minute candles) "late". On a 4 hour chart, it will be 16 hours (4 x 4 hour candles) "late".

What we've discussed above, is the non-early detection algorithm, also known as the 2 pivots based detection algorithm. For divergences to be identified you need 2 pivots confirmed on your chart. One at the starting point of the divergence, and one at the ending point.

While this is the most accurate way of identifying divergences, the indicator also supports a "1 pivot based divergence detection algorithm", which in the indicator we refer to as the "early detection" algorithm.

When early detection is enabled, the indicator will simply treat every single candle as the next potential pivot. If at the moment of the closing the rightmost candle the price is going one direction, while the oscillator is going the opposite, it is assumed that a divergence is about to form, and the indicator will signal it as an "early divergence". You may think of the early detection algorithm being the same as the non-early algorithm, but with a 0 candle delay, and you would be completely right. Is the early detection algorithm going to give you accurate divergence signals? Based on what we have discussed above, very likely not, however when it is used for what it was designed for (notification of a potential divergence forming) it can be a powerful tool.

No. The indicator is programmed in such a way, that it only registers pivots and divergences on the close of a candle. This makes it detect the exact same divergences during backtesting and forward-testing (i.e. when you use it for alerting purposes).

Yes*. The indicator can send you an alert whenever any of the four supported divergence is detected. You can even set up alerts on the pivot low / high confirmations themselves.

Please note that divergences are normally signalled on the candle on which the ending pivot of the divergence was confirmed (marked with purple triangle), which is usually several candles after the ending point of the divergence. For more info on this delay, please see the "Is it a lagging indicator?" section above.

*: Pro feature

The answer to this question depends on your perspective.

Will the use of the indicator alone make you rich financially? NO.

If however what you mean by rich is "richer in free time", then the answer is a definite YES.

You should look at the indicator as a tool to save you time, not to print you money. By putting it to work, you will be able to stop your daily routine of scanning dozens of charts just for the purpose of identifying divergences. The indicator will take care of this mundane task for you. This will result in a lot of time being freed up for you to do more important things in your life.

The Divergent is a divergence indicator, nothing else. It is excellent at spotting divergences, but it does not have a crystal ball. If it tells you that it sees a Regular Bullish divergence, that's all there is to it. It does not tell you that the price will change its direction, it simply tells you that it spotted a divergence. How you interpret this signal, is completely up to you. Whatever you do, please do not make trading decisions on the presence of a divergence alone (see next question).

Please don't do this. Divergences on their own should not be used as a trade signal under any circumstance. You should always seek for confluence from several other indicators to decide whether to act on a divergence or not.

This all comes down to the answering the following question: What is the best timeframe to detect divergences on?

In general, it can be said that the higher the timeframe (1 hour+), the more likely that the divergence is a signal, and not just a noise. While you can apply the indicator to a 1 minute timeframe on TradingView, we do not recommend doing this. The indicator will be signalling divergences up and down and left and right, and you will find that very few of those are actually going to play out.

You can also try to answer this question yourself. Place the indicator on a 5 minute chart, scroll back to the beginning of time, and go through each signalled divergence one by one and see if they correctly predicted where price was about to move. Repeat this exercise on multiple timeframes, and see which one gives the best predictions.

No. No computer can replace the human eye (at least not in a Pine Script indicator), and its accuracy for spotting divergences. The Divergent will inevitably send out false positive signals every now and then. However, if you spend some time tweaking its filters, you will be able to reduce the false positive detection to a minimum. For example, if you enable the built-in Line of Sight ™ filter, only those divergences will be considered valid, where the lines that connect the two ends of the divergence is not interrupted by any price candles. There are many other filters available to allow you to further minimise the number of false positive detections.

While technically possible, it is not a good idea to do so.

As mentioned in the section above, the indicator will emit false positive signals from time to time. You just simply cannot eliminate all of them in a Pine Script indicator.

With this in mind, we highly recommend that you always confirm (with your eyes) the signalled divergence being a valid one before taking any action.

To cancel your subscription, simply go to your Memberful account by clicking here (opens in a new window). You can log in with the email address you provided during sign up. If you can't remember your email address, reach out to us via the chat button in the bottom right corner of this webpage, and we will help you get your subscription cancelled.

Please note that once you cancel your subscription, as soon as the subscription becomes inactive (1 month following your last payment), you will lose access to the indicator.

Yes, the indicator was developed specifically for the TradingView platform, however using 3rd party tools (such as PineConnector) you should be able to plug the alerts into other systems, like MetaTrader.

No, you can get started with a Basic (free) account on TradingView, however if you plan to set up multiple alerts (which should be your main motivation for using The Divergent!), you will need to subscribe to one of their paid plans. The basic TradingView subscription only lets you have a single alert active at a time.

Yes, The Divergent comes with a 45+ page PDF which goes into the details of every configuration option. Once you become a subscriber, you will receive the link to the document.

On top of this PDF, we also have each and every configuration documented in the indicator settings window. Simply hover your mouse over the ( i ) icon next to each input to learn more about its purpose.


The Divergent is available in two editions



Per month

  • ✅ Automated divergence detection
  • ✅ 25+ configuration options for
    accurate divergence detection
  • ✅ Regular divergences
  • ✅ Works with 2 oscillators: MACD, RSI
  • ✅ Divergence statistics
  • ✖️ No alerts
  • ✖️ No hidden divergences
  • ✖️ No companion indicator


Per month

  • ✅ Everything from the Basic version
  • ✅ Divergence alerts
  • ✅ Regular and Hidden divergences
  • ✅ Access to companion indicator
  • ✅ Works with all 9 oscillators
  • ✅ Divergence verification
  • ✅ Use the signals in your own strategy
  • ✅ Customize the style of divergence
    lines and labels

Subscribe to Pro

To get access to the Pro version of The Divergent, please follow these steps:


Sign up for a monthly subscription

The first step is to set up your subscription. The platform we use for managing subscriptions is called Memberful. By clicking here, a pop up will open where you can sign up for a Memberful account and set up your subscription. Please note, that all of your payment details are safeguarded by Memberful's payment processor, so neither Memberful, nor us have access to your card details.

Join our private Discord server

Once you set up your subscription, you will receive an invitation email with a link to join our private Discord server. Discord is the community platform we use to discuss the indicators and strategies, and it is also the place where you will link your TradingView user to your Memberful account.

Link your TradingView account

The final step is to link your TradingView username to your Memberful subscription. The instructions on how do this is included in your Discord invitation email. Once your accounts are linked, you will instantly get access to the indicator!


If you have any questions, just reach out to us via the Live Chat button found at the bottom right corner of this page.

© Copyright 2021 - All Rights Reserved - The Divergent is a product of Whitebox Software