OPEN-SOURCE SCRIPT
Updated VIOP Scalping - ATR SNIPER

VIOP Scalping – ATR SNIPER is a momentum-based scalping strategy designed to capture short, high-probability moves while keeping risk strictly defined using ATR-based stop-loss and fixed risk/reward targets. The strategy trades only when trend direction, momentum, and strength are aligned.
This script is provided for educational and testing purposes only. It does not guarantee profitability and must be used with proper risk management.
How the Strategy Works
Long Entry Conditions
Short Entry Conditions
Risk Management – ATR Sniper Logic
What You See on the Chart
Recommended Use
Always backtest and forward-test on your own instruments and timeframes before using this strategy in live markets.
This script is provided for educational and testing purposes only. It does not guarantee profitability and must be used with proper risk management.
Core Idea
Trade in the direction of the dominant trend, confirm momentum acceleration, and manage risk using ATR-based dynamic stops and targets.
How the Strategy Works
- The main trend is defined using a Weighted Moving Average (WMA).
- Momentum is measured by the distance and direction between a fast EMA and a slow EMA.
- Trend strength is confirmed using ADX.
- RSI is used as a filter to avoid weak or overextended market conditions.
- Entries are blocked during a predefined no-trade time window to avoid high-noise periods.
Long Entry Conditions
- Fast EMA is above Slow EMA and the EMA difference is greater than the minimum threshold.
- EMA momentum is increasing compared to the previous bar.
- RSI is within the user-defined long range.
- Current close is higher than the previous close.
- ADX is above the minimum strength threshold.
- Price is above the WMA trend line.
- The current bar is not inside the no-trade session.
Short Entry Conditions
- Fast EMA is below Slow EMA and the EMA difference is below the negative threshold.
- Bearish EMA momentum is increasing.
- RSI is within the user-defined short range.
- Current close is lower than the previous close.
- ADX is above the minimum strength threshold.
- Price is below the WMA trend line.
- The current bar is not inside the no-trade session.
Risk Management – ATR Sniper Logic
- Stop-loss distance is calculated as ATR multiplied by the ATR Multiplier.
- Take-profit distance is calculated using the defined Risk/Reward ratio.
- Stop-loss and take-profit levels are dynamically calculated per trade.
- Only one position can be open at any given time.
What You See on the Chart
- Weighted Moving Average (WMA) trend line.
- Fast EMA and Slow EMA lines.
- Dynamic stop-loss line during active trades.
- Dynamic take-profit line during active trades.
Recommended Use
- Intraday scalping on VİOP instruments.
- Momentum-based short-term trading.
- Traders who prefer rule-based systems with strict risk control.
Always backtest and forward-test on your own instruments and timeframes before using this strategy in live markets.
Release Notes
Commission Value has been changed.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.