0

Libertus divergences indicators explained step-by-step

If you tried your hand at trading cryptocurrencies you probably heard of divergences. Trading price and indicator divergences were one of the more popular strategies in cryptocurrency trading when I entered the crypto world at the start of 2018. After a few months, I trained myself to spot divergences very quickly, but I noticed others had trouble with that, so I decided to publish indicators on Trading View. At that time, there were a small number of divergence indicators available on Trading View and all of them were buggy. They missed a lot of divergences and even showed nonexistent divergences as valid.

One of the popular strategies was to predict top or bottom based on how RSI (Relative Strength Index) diverged from price. That’s why my first indicator was Relative Strength Index – Divergences – Libertus published on September 29th, 2018.

RSI Relative Strength Index – Divergences – Libertus
Trading View chart with Relative Strength Index – Divergences – Libertus indicator

Over time my indicator evolved to become probably the most accurate RSI divergence indicator on Trading View. The indicator source was published intentionally because I hoped other scriptwriters would use it to make all kinds of different divergence indicators now that RSI was covered. Some scriptwriters did just that and made cool new indicators that helped other traders make more informed decisions in their trading.

Also, a lot of them just copied the code, made a few cosmetic changes, and republished it as their own, even asking for financial compensation for access to a great RSI divergence indicator. 😀 But I’m not going to spend more time on them, most of them got removed from TV for their attempts.

Using the indicator

The easiest way to add an indicator to the chart is by clicking on the “Add Indicator, Metrics and Strategies” button: and then just write “libertus” into the search field. This will filter all my indicators and some other which used my name in their indicators. After that, just click on the indicator name from a filtered list of indicators. The indicator will be added to your chart with its default settings which will look something like this:

RSI Relative Strength Index – Divergences – Libertus default settings
Indicator with default settings.

To change indicator settings hover over the indicator with your mouse and settings button will be shown. Click on it and you can start adapting the indicator to your liking.

“Inputs” tab is what you are searching for if you want to change the most important indicator settings. Other tabs are TV-controlled tabs, which usually impact colors and visibility.

Options you can play with are:
RSI options

  • RSI length
  • Overbought
  • Oversold

Divergence options

  • Hide pivots?
  • Shorter labels?
  • Hide labels and color background
  • Div lookback period (bars)?

I’m not going to go into details about RSI options since they are all standard parts of the Relative Strength Index indicator. You can find all explanations in the provided link.

Hide pivot?
It hides pivot (blue) markings from the indicator. Can be used if you want a cleaner indicator / chart and you have no need to know the last pivot position.

Pivot is highest or lowest indicator value (in this case RSI value) in lookback period.

Shorter labels?
It removes text from labels so you are just left with colored labels.

RSI Relative Strength Index – Divergences – Libertus no labels settings
Indicator with shorter labels option turned on.

Hide labels and color background
This option is my personal preference since its elegant and doesn’t clutter the interface or block visibility on RSI. It will remove labels completely and just color indicator bar with semi-transparent color depending on if it’s pivot or divergence.

RSI Relative Strength Index – Divergences – Libertus hide labels color background settings
Indicator with hide labels and color background option turned on.

Div lookback period (bars)?
This option defines how far into the past will indicator search for pivots and chart divergences based on them. It’s defined in a number of bars on a chart you are using with a default value of 90 bars.
The bar is equal to the time frame you choose for your chart:

  • 15min chart -> 1 bar = 15 min
  • 1h chart -> 1 bar = 1 hour
  • 1d chart -> 1 bar = 1 day
  • 1w chart -> 1 bar = 1 week
  • 1m chart -> 1 bar = 1 month

Based on my observations while making this indicator, default value of 90 is good for a timeframe up to 1d. A higher timeframe could probably use lower values.

FAQ – frequently asked questions

How to add an alert?

The script has a hardcoded option for bullish divergence, bearish divergence, pivot high, and pivot low alerts. Trading View help center describes nicely and in-depth how to set up alerts. In creating alert dialog, change “Conditon” to “RSI Div – Lib” and you will be offered a choice between “Bear div”, “Bull div”, “Pivot high” and “Pivot low”.

When is the signal for bull and bear div provided?

A divergence signal is provided after two conditions are met:
1. Last closed candle has divergences.
2. Current candle last price is lower (in case of bear div) or higher (in case of bull div) previous candle closing price.
In real-world conditions this means anything between a few seconds after the previous candle close to the whole candle time, depending on when price meets the condition. This also means the indicator could show you a divergence signal, but after some time (before candle close) remove that signal. The signal was removed because the current candle is now showing divergence (or has satisfied pivot conditions) and the indicator is removing the last divergence so it doesn’t show repeating divergences on all candles.

When is the signal for pivot provided?

A pivot signal is provided after two candles close. If I would remove this condition, the indicator would paint blue pivots one after another as long as RSI is increasing and it is higher than the last candle RSI. That’s also why the pivot label could be removed before the candle closes.

Is your indicator re-painting?

No, please read answers to the last two questions about signals for pivots, bullish and bearish divergences. Labels can be shown and removed only during a period of one candle. If it’s still there after the candle closes (which means all conditions are met) it will never be removed.

Can you please add “this” feature?

If you have an idea how to improve the indicator, feel free to write about it in indicator comments on TV or send me a private message. If a new feature is requested by more users it has a higher chance to be implemented. If you want me to adapt the indicator just for you, send me a private message and I’ll send you a quote depending on the time needed to implement it.

Will you add hidden divergence to the indicator?

Probably not. Hidden divergences are always there and I don’t really see how it would benefit users.

Now that you have your answers, it’s time for some links.

If you have more questions, please use the contact form or comments.

Libertus Avatar
Libertus

Crypto enthusiast since February 2018 and apparently popular scriptwriter on Tradingview. :) Working in a senior management position in a company that has absolutely nothing to do with crypto or capital markets. This is my personal blog that aims to help people understand crypto and make it easier for them to make their own conclusions. Nothing I write here is an investment advice or advice to buy. Always do extensive research prior to buying or investing your hard-earned money in anything, especially cryptocurrencies. Cryptocurrency space is more than 90% scam, so losing money is very easy. Since I am not a native English speaker, forgive me for any spelling mistakes.

Leave a Reply

Your email address will not be published.