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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。