OPEN-SOURCE SCRIPT
Adaptive ATR Scalper - Instant & Lock Version

Welcome to Adaptive ATR Scalper, a robust, trend-following scalping strategy designed to capture quick momentum bursts while heavily filtering out noise during chop or post-target consolidation.
This strategy combines an ADX-Adaptive ATR trailing stop with a dual-timeframe dynamic (Main Trend + Fast Trigger) and introduces a unique Smart Lock Mechanism to prevent overtrading.
⚡ Key Features
ADX-Adaptive Multiplier
Most ATR-based indicators (like Supertrend) use a fixed multiplier, which fails when market regimes change. This strategy dynamically switches its ATR multiplier based on ADX.
When ADX is rising (strong trending environment), it uses a tighter multiplier (m1) to secure early entries.
When ADX is falling (weakening trend or chop), it automatically widens the multiplier (m2) to prevent getting chopped out.
Dual-Layer Trend Alignment
Main Trend (Thick Line): Acts as the major filter, keeping you on the right side of the macro direction.
Fast Trigger (Thin Line): Captures micro-swings.
An entry only occurs when both trends align in the same direction.
Smart Lock Mechanism (The Anti-Overtrading Shield)
A classic problem with scalping scripts is that after a successful TP (Take Profit) or SL (Stop Loss), the script immediately re-enters the same trend, often leading to losses.
How it works: As soon as a position closes, the strategy enters a Lock State (visualized by a grey background).
How it unlocks: It will not take another trade until either the Main Trend or the Fast Trigger changes direction. This ensures you only trade fresh momentum.
🛠️ Execution & Exit Rules
Entries: Triggered when Main Trend == Fast Trigger and the script is not locked.
Exits: The strategy utilizes a triple-exit matrix for maximum safety:
Dynamic Trend Exit: If the Fast Trigger reverses against the position, it exits immediately to preserve capital.
Fixed Stop Loss (SL): Percentage-based emergency stop.
Fixed Take Profit (TP): Percentage-based target to lock in gains.
📊 Recommended Settings & Assets
Assets: High-liquidity instruments (Crypto majors like BTC/ETH, Forex majors, or Index Futures like Nasdaq/SPY).
Timeframes: Designed primarily for 1m, 3m, 5m, and 15m charts.
Tip: Adjust the SL/TP percentages based on the volatility of your selected asset and timeframe.
Disclaimer: Backtest thoroughly before deploying live. Past performance does not guarantee future results.
This strategy combines an ADX-Adaptive ATR trailing stop with a dual-timeframe dynamic (Main Trend + Fast Trigger) and introduces a unique Smart Lock Mechanism to prevent overtrading.
⚡ Key Features
ADX-Adaptive Multiplier
Most ATR-based indicators (like Supertrend) use a fixed multiplier, which fails when market regimes change. This strategy dynamically switches its ATR multiplier based on ADX.
When ADX is rising (strong trending environment), it uses a tighter multiplier (m1) to secure early entries.
When ADX is falling (weakening trend or chop), it automatically widens the multiplier (m2) to prevent getting chopped out.
Dual-Layer Trend Alignment
Main Trend (Thick Line): Acts as the major filter, keeping you on the right side of the macro direction.
Fast Trigger (Thin Line): Captures micro-swings.
An entry only occurs when both trends align in the same direction.
Smart Lock Mechanism (The Anti-Overtrading Shield)
A classic problem with scalping scripts is that after a successful TP (Take Profit) or SL (Stop Loss), the script immediately re-enters the same trend, often leading to losses.
How it works: As soon as a position closes, the strategy enters a Lock State (visualized by a grey background).
How it unlocks: It will not take another trade until either the Main Trend or the Fast Trigger changes direction. This ensures you only trade fresh momentum.
🛠️ Execution & Exit Rules
Entries: Triggered when Main Trend == Fast Trigger and the script is not locked.
Exits: The strategy utilizes a triple-exit matrix for maximum safety:
Dynamic Trend Exit: If the Fast Trigger reverses against the position, it exits immediately to preserve capital.
Fixed Stop Loss (SL): Percentage-based emergency stop.
Fixed Take Profit (TP): Percentage-based target to lock in gains.
📊 Recommended Settings & Assets
Assets: High-liquidity instruments (Crypto majors like BTC/ETH, Forex majors, or Index Futures like Nasdaq/SPY).
Timeframes: Designed primarily for 1m, 3m, 5m, and 15m charts.
Tip: Adjust the SL/TP percentages based on the volatility of your selected asset and timeframe.
Disclaimer: Backtest thoroughly before deploying live. Past performance does not guarantee future results.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.