OPEN-SOURCE SCRIPT
Range Filter Strategy with ATR TP/SL

How This Strategy Works:
Range Filter:
Calculates a smoothed average (SMA) of price
Creates upper and lower bands based on standard deviation
When price crosses above upper band, it signals a potential uptrend
When price crosses below lower band, it signals a potential downtrend
ATR-Based Risk Management:
Uses Average True Range (ATR) to set dynamic take profit and stop loss levels
Take profit is set at entry price + (ATR × multiplier) for long positions
Stop loss is set at entry price - (ATR × multiplier) for long positions
The opposite applies for short positions
Input Parameters:
Adjustable range filter length and multiplier
Customizable ATR length and TP/SL multipliers
All parameters can be optimized in TradingView's strategy tester
You can adjust the input parameters to fit your trading style and the specific market you're trading. The ATR-based exits help adapt to current market volatility.
Range Filter:
Calculates a smoothed average (SMA) of price
Creates upper and lower bands based on standard deviation
When price crosses above upper band, it signals a potential uptrend
When price crosses below lower band, it signals a potential downtrend
ATR-Based Risk Management:
Uses Average True Range (ATR) to set dynamic take profit and stop loss levels
Take profit is set at entry price + (ATR × multiplier) for long positions
Stop loss is set at entry price - (ATR × multiplier) for long positions
The opposite applies for short positions
Input Parameters:
Adjustable range filter length and multiplier
Customizable ATR length and TP/SL multipliers
All parameters can be optimized in TradingView's strategy tester
You can adjust the input parameters to fit your trading style and the specific market you're trading. The ATR-based exits help adapt to current market volatility.
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.