OPEN-SOURCE SCRIPT

TwinSmooth ATR Bands | QuantEdgeB

353
TwinSmooth ATR Bands | QuantEdgeB

🔍 Overview
TwinSmooth ATR Bands | QuantEdgeB is a dual-smoothing, ATR-adaptive trend filter that blends two complementary smoothing engines into a single baseline, then builds dynamic ATR bands around it to detect decisive breakouts. When price closes above the upper band it triggers a Long regime; when it closes below the lower band it flips to Short—otherwise it stays neutral. The script enhances clarity with regime-colored candles, an active-band fill, and an optional on-chart backtest table.

✨ Key Features
1. 🧠 Twin-Smooth Baseline (Dual Engine Blend)
- Computes two separate smoothed baselines (a slower “smooth” leg + a faster “responsive” leg).
- Blends them into a single midpoint baseline for balanced stability + speed.
- Applies an extra EMA smoothing pass to produce a clean trend_base.
2. 📏 ATR Volatility Bands
- Builds upper/lower bands using ATR × multiplier around the trend_base.
- Bands expand in volatile conditions and contract when markets quiet down—auto-adapting without manual tweaks.
3. ⚡ Clear Breakout Regime Logic
- Long when close > upperBand.
- Short when close < lowerBand.
- Neutral otherwise (no forced signals inside the band zone).
4. 🎨 Visual Clarity
- Plots only the active band (lower band in long regime, upper band in short regime).
- Fills between active band and price for instant regime context.
- Colors candles to match the current state (bullish / bearish / neutral).
- Multiple color palettes + transparency control.


💼 Use Cases
• Trend Confirmation Filter: Use the regime as a higher-confidence trend gate for entries from other indicators.
• Breakout/Breakdown Trigger: Trade closes outside ATR bands to catch momentum expansions.
• Volatility-Aware Stops/Targets: Bands naturally reflect volatility, making them useful as adaptive reference levels.
• Multi-Timeframe Alignment: Confirm higher-timeframe regime before executing on lower timeframes.

🎯 For Who
• Trend Traders who want clean regime shifts without constant whipsaw.
• Breakout Traders who prefer confirmation via ATR expansion rather than raw MA crossovers.
• System Builders needing a simple, robust “state engine” (Long / Short / Neutral) to plug into larger strategies.
• Analysts who want quick on-chart validation with a backtest table.

⚙️ Default Settings
• SMMA Length (Base Smooth Leg): 24
• TEMA Length (Base Responsive Leg): 8
• EMA Extra Smoothing: 14
• ATR Length: 14
• ATR Multiplier: 1.1
• Color Mode: Alpha
• Color Transparency: 30
• Backtest Table: On (toggleable)
• Backtest Start Date: 09 Oct 2017
• Labels: Off by default

📌 Conclusion
TwinSmooth ATR Bands | QuantEdgeB merges a dual-speed smoothing core into a single trend baseline, then wraps it with ATR-based bands to deliver clean, volatility-adjusted breakout signals. With regime coloring, active-band plotting, and optional backtest stats, it’s a compact, readable tool for spotting momentum shifts and trend continuation across any market and timeframe.

🔹 Disclaimer: Past performance is not indicative of future results. Always backtest and align settings with your risk tolerance and objectives before live trading.
🔹 Strategic Advice: Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。