LeafAlgo

Donchian Cloud Score w/ Table

LeafAlgo Updated   
This indicator contains a set of 5 Donchian channels (upper, lower, and basis plotted) defaulted to lengths of 25, 50, 100, 150, and 200. A set of conditions associated with the channels aims to determine ranging versus trending markets. Weights are given to these conditions accordingly, then tallied up to determine the "cloud score", ranging between -25 and 25. For the purposes of this indicator, a ranging market is determined by a cloud score between -10 and 10, while a positive trending market has a score higher than 10 and a negative trending market has a score lower than -10. This score is accompanied by altered bar color to reflect the score - gray for ranging markets, green for positive trending markets, and red for negative trending markets. Breaking of upper or lower Donchian bands is typically a good indication of a potential breakout. Having a weighted system for these conditions will provide more insight and layers of confirmation into a Donchian breakout trading strategy. The table will reflect these values through positive, negative, and neutral coloration.

The list of conditions and their associated weights for this indicator are as follows:
- Broke the 25-length DC (DC(25)) upper band in the previous 3 bars - +1 if true, 0 if false
- Broke the DC(50) upper band in the previous 3 bars - +2 if true, 0 if false
- Broke the DC(100) upper band in the previous 3 bars - +3 if true, 0 if false
- Broke the DC(150) upper band in the previous 3 bars - +4 if true, 0 if false
- Broke the DC(200) upper band in the previous 3 bars - +5 if true, 0 if false

- Broke the DC(25) lower band in the previous 3 bars - -1 if true, 0 if false
- Broke the DC(50) lower band in the previous 3 bars - -2 if true, 0 if false
- Broke the DC(100) lower band in the previous 3 bars - -3 if true, 0 if false
- Broke the DC(150) lower band in the previous 3 bars - -4 if true, 0 if false
- Broke the DC(200) lower band in the previous 3 bars - -5 if true, 0 if false

- DC(25) basis line above the DC(50) basis line - +1 if true, -1 if false
- DC(25) basis line above the DC(100) basis line - +1 if true, -1 if false
- DC(25)basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(25) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(100) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(50) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(100) basis line above the DC(150) basis line - +1 if true, -1 if false
- DC(100) basis line above the DC(200) basis line - +1 if true, -1 if false
- DC(150) basis line above the DC(200) basis line - +1 if true, -1 if false
Release Notes:
Fixed the spelling of "Donchian" in the settings
Release Notes:
Added a plotcandle() function in addition to the barcolor() function. To see the candle coloration properly, ensure that the indicator is "brought to front".

Colors changed as well. Instead of green for above a score of 10, red below a score of -10, and grey in-between, the colors are now:
- Score >= 10 --> Lime
- Score between 7 and 10 --> Green
- Score between 7 and -7 --> Gray
- Score between -7 and -10 --> Orange
- Score <= -10 --> Red
Release Notes:
- Removed the basis lines from the plot (not the calculations, though) for visual clarity
- Removed the barcolor() option and replaced with the plotcandle() function
- Added in a volume profile range in which the user can view a breakdown of volume across the previous x number of bars as a histogram with y number of sections. The number of bars back, the number of histogram sections, and the size of the histogram can be set individually.
Release Notes:
Reduced number of bars back in default (250 from 300).

Take your trading to new heights with LeafAlgo Premium Indicators and Strategies. Use code SSMS4MGK at checkout for a 50% discount on your first purchase at www.LeafAlgo.com !

Join our Discord community today!
www.discord.gg/rNQ2QW59Pn
Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact LeafAlgo for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Author's instructions

Message directly through TradingView or via email at thubbard@plantfi.io

Want to use this script on a chart?

Warning: please read before requesting access.