OPEN-SOURCE SCRIPT

Donchian Channel with Range Addition

Updated
A Donchian Channel with additional zones at places where its range is smaller than a set amount of atr. Thus it kind of combines with Keltner Channel qualities. Purpose is to set a stop loss wide enough to avoid shaking out of a position. The example chart shows a Philips day chart, where I opened position on 16 juli at 37,50 and set the stop loss at low border level 35,60, on 23 juli was an earnings rapport, the wick of the candle shows that quotes went very low, obviously smart traders had to fill a huge order and hunted for stops, triggering my stop closing the position. next days quotes went a lot better, so I missed the fun. The Donchian Channel was too narrow because quotes had ranged in the previous weeks. If I had placed my stop on the additional low, setting it 5 atr below the high border, my stop would have been safe.
Release Notes
In the update a recalculation is done if the border of the Donchian Channel changes
Breadth IndicatorsdonchianchannelwidthstoplossTrend AnalysisVolatility

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?

Disclaimer