OPEN-SOURCE SCRIPT
Advanced Donchian Channels

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.
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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Pour un accès rapide sur un graphique, ajoutez ce script à vos favoris - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Pour un accès rapide sur un graphique, ajoutez ce script à vos favoris - en savoir plus ici.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.