OPEN-SOURCE SCRIPT

Peak Reversal v2

Updated
This is a brand new version of my Peak Reversal indicator. As with the older version, the idea behind this indicator is simple: identify potential price reversal areas, and identifying markets which are trending. In this new version I focused on improving on the old concept, but introduced a bunch of features heavily inspired by Adam Grimes' ideas from The Art and Science of Trading. (I also blatantly stole the way he colors candles outside of the bands. Sorry.)

As you can see below this indicator gives traders a plethora of tools to judge whether a market is trending, and might be mean reverting soon.

Follow me, join my group, like the script. You know the drill.

Basic functions:
You have a triplet of Keltner (ATR-based) bands in Peak Reversal. They are defined by a multiplier and an EMA, which is referred to as "the mean". There's a tight, normal, and an extreme band. The multiplier defines how far apart your bands are. By default the indicator uses 1.125, 2.25, and 3.375. The tight band is off by default, but you can turn it on in the options. The mean is also off by default. This is more a personal preference thing for me, because I happen to use a different indicator to show a couple of moving averages.

Band crosses:
Peak Reversal can indicate whenever price crosses one of the bands. This can help traders identify points where a mean reversal play could be an option. Triangles indicate these crosses. New in version 2 is the ability to choose which of the bands to use to show these crosses. If you are more of an aggressive trader, you might find it better to show tight band crosses. If you are looking for more extreme market conditions, then choose extreme. The default is "normal".

Free bars:
Indicating free bars is also a concept from the book. A "free bar" is one which stands "freely" above the bands, which means its low price is completely outside of the bands. It can be argued that a freely standing bar is an even more extreme mean deviation, than just a band cross. Traders can gain an additional advantage studying the markets this way. Free bars are not shown by default, when on, a star shape on the candles indicates free bars. Both band crosses and free bars can be shown at the same time, but there might be overlap.

Deviations:
Also based on a concept from The Art and Science of Trading, is an indication of price "deviations". You will notice that when a candle "touches" a band (high and close above band), its colored. The idea here is to show traders when a market is in motion, but also when a mean reversal might be coming next. To accomplish this, the more colors deviate, the darker the color is. The idea here is also simple, the more price deviates off the mean, the likelier it is to return to it. This uses three different shades to show these deviations. 1-2 is one shade, 3-4 another, and upwards of 5 there's only the darkest shade. I didn't make extensive studies, which color for how many candles would be appropriate to use, but I do believe it doesn't matter that much in usage. It's clear what traders gain from using this information: more deviation, the likelier a snapback becomes.

Advanced mode:
Last but not least, I decided to add an advanced mode for advanced traders. This does nothing more than flip all colors and shapes upside down. Everything that is red, becomes green. The idea is where some traders say "buy low, sell high" (standard mode), other traders might say "buy high, sell higher" (advanced mode). See for yourself, which one you like better.
Release Notes
Fixed Keltner calculation.
Keltner Channels (KC)meanreversion

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