PROTECTED SOURCE SCRIPT

ATR Trend Switch (ATR > k*ATR_SMA) - Overlay + Session Windows

64
🔧 Core Logic

ATR Source: Multi-timeframe ATR (default 1H while trading 5m/15m).

Threshold Rule:

TREND = ATR > (ATR_SMA × k)

NORMAL = otherwise

Sessions: Only evaluates during London (02:00–07:00 ET) and New York (07:00–11:30 ET) by default.

Smoothing: ATR compared against its SMA (default 10-period).

k Multiplier: Controls sensitivity (default 1.20).

🖥️ Visuals

✅ TREND: Green label (or green background if enabled).

⚪ NORMAL: Gray label.

⏸️ OUT OF SESSION: Dim label, so you don’t force trades off-hours.

📊 Optional panel shows ATR, ATR_SMA, and Threshold values in real time.

📊 Dashboard + Overlay Combo

Use this overlay on your chart TF for tactical entries.

Pair with an ATR Dashboard (pane) on a higher TF (like 1H) for the strategic backdrop.

Overlay TREND + Dashboard TREND → High conviction trending environment.

Overlay TREND but Dashboard NORMAL → Fragile breakout, trade smaller or pass.

Both NORMAL → Chop/range → stick to 1:1.4 BE rules.

⚖️ Trading Playbook Integration

NORMAL Mode (ATR below threshold)

50% partial at 1R.

BE @ 1:1.4.

Runner capped at 2R.

TREND Mode (ATR above threshold)

50% partial at 1R.

BE @ 1:1.6.

Remainder trails ATR ×1.5.

Reserve ~15% of trend trades as no-partials for fat-tail home runs (4R–6R+).

🔔 Alerts

ATR Trend ON (in session) → “ATR > Threshold → Switch to TREND BE (1:1.6).”

ATR Trend OFF (in session) → “ATR ≤ Threshold → Switch to NORMAL BE (1:1.4).”
Perfect for getting pinged the moment volatility regime flips.

📌 Tips

k = 1.20 → balanced (default).

k = 1.10–1.15 → more TREND calls (sensitive).

k = 1.30+ → only strongest trends count.

Run it with overlay ON chart TF for execution, and dashboard on HTF for context.

Best used during active London/NY sessions.

✅ This isn’t a signal generator. It’s a regime filter + risk manager.
It keeps you from chasing chop and helps you mechanically switch BE rules without hesitation.

⚡ Pro tip: Combine with a Trend Continuation HUD, Elliott Wave Convergence overlay, or a Bollinger+RSI/MFI reversal scanner for a full tactical playbook.

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.