OPEN-SOURCE SCRIPT
ATR Money Line Bands V2

The "ATR Money Line Bands V2" is a clever TradingView overlay designed for trend identification with volatility-aware bands, evolving from basic ATR envelopes.
Reasoning Behind Construction: The core idea is to blend a smoothed trend line with dynamic volatility bands for reliable signals in varying markets. The "Money Line" uses linear regression (ta.linreg) on closes over a length (default 16) instead of a moving average, as it fits data via least-squares for a cleaner, forward-projected trend without lag artifacts. ATR (default 12-period) powers the bands because it measures true range volatility better than std dev in gappy assets like crypto/stocks—bands offset from the Money Line by ATR * multiplier (default 1.5). A dynamic multiplier (boosts by ~33% on spikes > prior ATR * 1.3) prevents tight bands from false breakouts during surges. Trend detection checks slope against an ATR-scaled tolerance (default 0.15) to ignore noise, labeling bull/bear/neutral—avoiding whipsaws in flats.
Properties: It's an overlay with a colored Money Line (green bull, red bear, yellow neutral) and invisible bands (toggle to show gray lines) filled semi-transparently matching trend for visual pop. Dynamic adaptation makes bands widen/contract intelligently. An info table (positionable, e.g., top_right) displays real-time values: Money Line, bands, ATR, trend—great for quick scans. Limits history (2000 bars) and labels (500) for efficiency.
Tips for Usage: Apply to any timeframe/asset; defaults suit medium-term (e.g., daily stocks). Watch color flips: green for longs (enter on pullbacks to lower band), red for shorts (vice versa), yellow to sit out. Use bands as S/R—breakouts signal momentum, squeezes impending vol. Tweak length for sensitivity (shorter for intraday), multiplier for width (higher for trends), tolerance for fewer neutrals. Pair with volume/RSI for confirmation; backtest to optimize. In choppy markets, disable dynamic mult to avoid over-expansion. Overall, it's adaptive and visual—helps trend-follow without overcomplicating.
Reasoning Behind Construction: The core idea is to blend a smoothed trend line with dynamic volatility bands for reliable signals in varying markets. The "Money Line" uses linear regression (ta.linreg) on closes over a length (default 16) instead of a moving average, as it fits data via least-squares for a cleaner, forward-projected trend without lag artifacts. ATR (default 12-period) powers the bands because it measures true range volatility better than std dev in gappy assets like crypto/stocks—bands offset from the Money Line by ATR * multiplier (default 1.5). A dynamic multiplier (boosts by ~33% on spikes > prior ATR * 1.3) prevents tight bands from false breakouts during surges. Trend detection checks slope against an ATR-scaled tolerance (default 0.15) to ignore noise, labeling bull/bear/neutral—avoiding whipsaws in flats.
Properties: It's an overlay with a colored Money Line (green bull, red bear, yellow neutral) and invisible bands (toggle to show gray lines) filled semi-transparently matching trend for visual pop. Dynamic adaptation makes bands widen/contract intelligently. An info table (positionable, e.g., top_right) displays real-time values: Money Line, bands, ATR, trend—great for quick scans. Limits history (2000 bars) and labels (500) for efficiency.
Tips for Usage: Apply to any timeframe/asset; defaults suit medium-term (e.g., daily stocks). Watch color flips: green for longs (enter on pullbacks to lower band), red for shorts (vice versa), yellow to sit out. Use bands as S/R—breakouts signal momentum, squeezes impending vol. Tweak length for sensitivity (shorter for intraday), multiplier for width (higher for trends), tolerance for fewer neutrals. Pair with volume/RSI for confirmation; backtest to optimize. In choppy markets, disable dynamic mult to avoid over-expansion. Overall, it's adaptive and visual—helps trend-follow without overcomplicating.
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.
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.
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.