PTI 2025: ATR TREND TRACKER

This indicator helps traders follow trends while managing risk using a dynamic trailing stop based on volatility (ATR). It also adds a higher timeframe trend filter to avoid trading against the major trend.
How It Works
1. ATR Trailing Stop (Main Mechanism)
Calculates the Average True Range (ATR) over a long period (default: 250 bars).
Sets a trailing stop level at a multiple (default: 3x) of the ATR.
If price rises, the stop moves up, locking in profits.
If price falls, the stop stays fixed until broken.
The stop flips direction when price crosses it.
2. Higher Timeframe Trend Filter (Extra Confirmation)
Checks if the Daily (or selected HTF) close is above/below a 200-period EMA.
Green background = Uptrend (favor long trades).
Red background = Downtrend (favor short trades).
Optional: Can disable this filter if you want pure ATR signals.
3. Buy & Sell Signals
Buy Signal → Price crosses above the ATR stop + HTF trend is up (if filter is on).
Sell Signal → Price crosses below the ATR stop + HTF trend is down (if filter is on).
4. Visuals & Alerts
Trailing Stop Line (changes color based on trend direction).
Buy/Sell Labels (appear below/above candles).
Alerts (can notify you when signals trigger).
UPDATE RELEASE
What has been updated?
- BAR COLOR: When the signal is activated, the candlestick becomes white (or a selectable color from style settings)
- SIGNAL BAR STYLING: When the background is green, it means that the higher timeframe trend is uptrend, then the sell signals decrease in color intensity, and vice versa when the background is red it means that the higher timeframe trend is downtrend, then the buy signals decrease in color intensity.
(color and intensity selectable from input settings).
- SIGNAL ACTIVATION FIXED: now the signals are activated and do not disappear after the next signal is activated.
PERSONAL CONSIDERATION: you must always analyze the chart and the price where it is, always consider pullback, trendlines, support and resistance.
ADVANTAGE:
- When background is green try to take only buy signals
- When background is red try to take only sell signals.
UPDATE RELEASED
WHAT HAS CHANGED WITH THE NEW UPDATE?
- SIGNALS:
1 - WHEN THE BACKGROUND IS RED (DOWNTREND) YOU WILL ONLY RECEIVE SELL SIGNALS
2 - WHEN THE BACKGROUND IS GREEN (UPTREND) YOU WILL ONLY RECEIVE BUY SIGNALS
FROM INPUT YOU CAN STILL DISABLE THE POSSIBILITY OF MASKING THE SIGNALS AND RECEIVE ALL OF THEM.
- ALERTS:
1 - WHEN THE BACKGROUND IS RED YOU WILL ONLY RECEIVE ALERTS FOR SELL SIGNALS
2 - WHEN THE BACKGROUND IS GREEN YOU WILL ONLY RECEIVE ALERTS FOR BUY SIGNALS.
IF MASK CONDITION IS DISABLED, YOU WILL RECEIVE ALERTS FOR ALL SIGNALS.
UPDATE RELEASED
WHAT'S UPDATED?
Added a SIDEWAYS condition for signal noise reduction. Now the output signals will be less and more specific to the chart.
background calulation changed to have a better upload on the chart.
possibility to change the settings from inputs
INDICATOR MORE STABLE WITH SIGNALS CONFIRMATION
- ADDED SIDEWAYS DETECTION SYSTEM TO AVOIND SIGNALS DURING SIDEWAY TREND.
INDICATOR CODE HAS BEEN UPDATED WITH SOME CHNAGES REGARDING THE INDICATOR CONFIGURATION AND VISUAL CONFIGURATION TO MAKE MORE EASY UNDERSTAND
- ADDED ALSO POSSIBILITY TO HAVE PLOTTED AN EMA TO THE CHART, TO UNDERSTAND BETTER THE HIGHER TIMEFRAME POSITION
- ABOVE EMA = UPTREND = BUY
- BELOW EMA = DOWNTREND = SELL
UPDATE RELASED
- ADDED EMA LINE: EMA HELPING TRADER TO FOUND THE TREND AT HIGHER TIMEFRAME EASLY.
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente PIONEER-TRADER.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.
Declinazione di responsabilità
Script su invito
Solo gli utenti autorizzati dall'autore hanno accesso a questo script e ciò richiede solitamente un pagamento. Puoi aggiungere lo script ai tuoi preferiti, ma potrai utilizzarlo solo dopo aver richiesto l'autorizzazione e averla ottenuta dal suo autore - per saperne di più leggi qui. Per maggiori dettagli, segui le istruzioni dell'autore qui sotto o contatta direttamente PIONEER-TRADER.
TradingView NON consiglia di pagare o utilizzare uno script a meno che non ci si fidi pienamente del suo autore e non si comprenda il suo funzionamento. Puoi anche trovare alternative gratuite e open-source nei nostri script della comunità.
Istruzioni dell'autore
Attenzione: prima di richiedere l'accesso, leggi la nostra guida per gli script su invito.