OPEN-SOURCE SCRIPT

Variable Keltner Channel For DCA

Updated
Hello Everyone,

Sharing the indicator that I'm using for Dollar Cost Averaging into the stocks & ETFs in my portfolio.
Instead of entering regularly each month, entry only happens when the share price is below the indicator.

This indicator is based on Exponential Moving Average & Keltner Channel.
When 21 EMA is above 34 EMA, the line is 1 ATR below the 21 EMA. (green color)
When 21 EMA is below 34 EMA, the line is 2 ATR below the 21 EMA. (red color)

Exploring ways to refine this further, especially during sideways or transition to downtrend, do comment if you have any idea.
This strategy itself was based on SMA 50 strategy for DCA.
Release Notes
Hello Everyone,

Trend is now determined by 8 EMA, 21 EMA, & 55 EMA.
To respond quicker to change in trend and better during sustained downtrends.

When 8 EMA is above 21 EMA, and 21 EMA is above 55 EMA, line is 1 ATR below 21 EMA (green).
When either 8 EMA is below 21 EMA, or 21 EMA is below 55 EMA, line is 2 ATR below 21 EMA (orange).
When both 8 EMA is below 21 EMA, and 21 EMA is below 55 EMA, line is 2.5 ATR below 21 EMA (red).

As always, do share if you have any idea for improvements!
Release Notes
Hello Everyone,

Update to the DCA line as I find myself entering at the 21 EMA during uptrends.

When 8 EMA is above 21 EMA, and 21 EMA is above 55 EMA, line is at 21 EMA (green).
When either 8 EMA is below 21 EMA, or 21 EMA is below 55 EMA, line is 1.25 ATR below 21 EMA (orange).
When both 8 EMA is below 21 EMA, and 21 EMA is below 55 EMA, line is 2.5 ATR below 21 EMA (red).
Keltner Channels (KC)

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