OPEN-SOURCE SCRIPT

ATR Overlay with Trailing Flip [ask2maniish]

262
📘 ATR Overlay with Trailing Flip [ask2maniish]
🔍 Overview
The ATR Overlay with Trailing Flip is a dynamic, visually-enhanced overlay indicator designed to assist traders in trend detection, trailing stop management, and volatility-based decision making. It leverages the Average True Range (ATR) with optional dynamic multipliers, filters, and alerts to enhance trade execution precision.

⚙️ Features Summary
✅ Static & dynamic ATR multiplier

✅ Customizable trailing stop logic

✅ Volume & Bollinger Band filters

✅ Buy/Sell label signals with alerts

✅ ATR bands with color fill

✅ Optional candle coloring based on trend

✅ Table showing current ATR multiplier

✅ Fully customizable visual controls

🔧 User Inputs
📘 Info Panel
ATR Usage Guide
Tooltip with trading-style recommendations:

Scalping: ATR 5–10, Intraday: ATR 10–14 , Swing: ATR 14–21 , Position: ATR 21–50

📊 Visual Elements
📈 Plots
Upper/Lower ATR Bands

ATR Fill Zone

Dynamic Trailing Stop Line

🕯 Candle Coloring
Candles colored green (uptrend) or red (downtrend)

Wick coloring matches body

🏷 Signal Labels
"BUY" below candle when trend flips up

"SELL" above candle when trend flips down

📊 Table (Top Right)
Displays current multiplier value:

If static: Static: x.x

If dynamic: percentage format based on ATR ratio

🔔 Alerts
Two alert conditions:

Flip to Long → "📈 ATR flip to LONG"

Flip to Short → "📉 ATR flip to SHORT"

Sound can be enabled for real-time feedback.

🧠 Best Practices
Combine this tool with support/resistance or order flow indicators

Use dynamic ATR during volatile periods for better adaptability

Filter signals in ranging markets with BBand Width Filter

For scalping, reduce ATR period and multiplier for tighter risk

🛠️ Customization Tips
Adjust trailingPeriod for tighter/looser stops

Use color inputs to match your charting theme

Disable features (labels/fill) to declutter chart

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.