The DCTI curve is calculated by comparing the differences between highs and lows over a major an minor period, and expressing them as a positive and negative percentage.
The curve is then smoothed with an to provide a signal line.
Custom bar colors included with two coloring methods to choose from.
Cleaned up the code. Condensed the operations into a function.
Bar color selection is now an easy to use dropdown menu.
Reach out on Telegram:
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 a publication is governed by House Rules. You can favorite it to use it on a chart.