OPEN-SOURCE SCRIPT

[dharmatech] KBDR Mean Reversion

Based on the criteria described in the book "Mean Revision Trading" by Nishant Pant.

Bullish signal criteria:

  • Bollinger Bands must be outside Keltner Channel
  • Price near bottom bband
  • DI+ increasing
  • DI- decreasing
  • RSI near bottom and increasing


Bearish signal criteria:

  • Bollinger Bands must be outside Keltner Channel
  • Price near upper bband
  • DI+ decreasing
  • DI- increasing
  • RSI near upper and decreasing


A single triangle indicates that all 4 criteria are met.
If letters appear with the triangle, this indicates that there was a partial criteria match.

  • K : bbands outside Keltner
  • B : bbands criteria met
  • D : DI criteria met
  • R : RSI criteria met


You can use the settings to turn off partial signals. For example:

"Partial 3" means show signals where 3 of the criteria are met.

If you want more insight into the underlying criteria, load these indicators as well:

Bollinger Bands (built-in to TradingView)
Keltner Channels (built-in to TradingView)
RSI (built-in to TradingView)
ADX and DI

Warning:

Not meant to be used as a stand-alone buy/sell signal.
It regularly provides signals which would not be profitable.
It's meant to be used in conjunction with other analysis.

Think of this as a time-saving tool. Instead of manually checking RSI, DI+/DI-, bbands, distance, etc. this does all of that for you on the fly.
Bands and ChannelsbollingersbandDirectional Movement Index (DMI)keltnerchannelmeanreversionRelative Strength Index (RSI)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer