OPEN-SOURCE SCRIPT
ATR Trailing + Alerts + Price Labels

ATR Trend is a clean and intelligent trend-following overlay built for traders who want clarity during both trending and ranging markets.
This indicator dynamically detects bullish and bearish market trends using the Average True Range (ATR), applying a confirmation-based approach to filter out false signals and minor pullbacks.
The trend line is:
Blue 🔵 during uptrends.
Black ⚫ during downtrends.
Continuous, recalculating only when the market truly shifts — not just when price temporarily crosses the line.
When a confirmed trend reversal occurs:
A 🔼 or 🔽 label shows the exact price of the flip.
An alert can be triggered to notify the user immediately.
💡 Features:
✅ Single-line trend direction
✅ Filters out short-term noise
✅ Exact price labeling on trend change
✅ Built-in alerts for up/down trend shifts
⚙️ Inputs:
ATR Period – Length of ATR calculation (default: 14)
ATR Multiplier – Offset for trend line placement (default: 2.0)
Flip Sensitivity – Number of bars required to confirm a trend reversal (default: 3)
This tool is suitable for:
Swing traders avoid false breakouts
Scalpers looking for high-probability trend entries
Algorithmic setups requiring structured trend logic
This indicator dynamically detects bullish and bearish market trends using the Average True Range (ATR), applying a confirmation-based approach to filter out false signals and minor pullbacks.
The trend line is:
Blue 🔵 during uptrends.
Black ⚫ during downtrends.
Continuous, recalculating only when the market truly shifts — not just when price temporarily crosses the line.
When a confirmed trend reversal occurs:
A 🔼 or 🔽 label shows the exact price of the flip.
An alert can be triggered to notify the user immediately.
💡 Features:
✅ Single-line trend direction
✅ Filters out short-term noise
✅ Exact price labeling on trend change
✅ Built-in alerts for up/down trend shifts
⚙️ Inputs:
ATR Period – Length of ATR calculation (default: 14)
ATR Multiplier – Offset for trend line placement (default: 2.0)
Flip Sensitivity – Number of bars required to confirm a trend reversal (default: 3)
This tool is suitable for:
Swing traders avoid false breakouts
Scalpers looking for high-probability trend entries
Algorithmic setups requiring structured trend logic
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.