OPEN-SOURCE SCRIPT

Advanced Donchian Channels

392
Just an indicator I got ChatGPT to cook up for my own use, sharing it in case anyone else finds it useful. I have included a screenshot of my own settings as well for reference.

This indicator enhances the classic Donchian Channel with powerful contextual features to support modern breakout and volatility-based trading strategies.

🔹 Core Features:
Donchian Bands: Plots the highest high and lowest low over a configurable lookback period.

Dynamic Fill Shading:
- Color-coded based on the slope of the midline (Basis): Default settings are Green for uptrend, Red for downtrend, Silver for flat, Gray for narrow volatility.
- All fill colors are fully customizable.

Volatility Filter:
- Detects when the channel width is narrow using either a fixed value or a percentage of price.
- Optionally shades only during low-volatility (compression) periods.

Customizable Style:
- Adjustable opacity, offsets, and color settings to suit your charting style.

🛠 Use Cases:
- Spot potential breakout setups after periods of low volatility.
- Identify trend direction via basis slope shading.
- Combine with momentum or volume tools for high-probability entries.

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.