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.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.