OPEN-SOURCE SCRIPT
Gold Smart Scalper V3 - Clean Chart

Overview
The Gold Smart Scalper V3 is a trend-following momentum strategy specifically optimized for XAU/USD (Gold). It focuses on catching "value pullbacks" within a strong trend, avoiding the noise of sideways markets. Unlike many scalpers that use lagging indicators for exits, this version uses fixed ATR-based targets to lock in profits during high-volatility moves common in Gold.
Core Methodology
The strategy operates on three layers of confirmation:
Macro Trend (HTF Filter): Uses a 50-period EMA to ensure trades are only taken in the direction of the higher-timeframe momentum.
The Value Zone: Instead of "chasing" green or red candles, the script waits for a pullback to the space between the 9 EMA and 21 EMA. This ensures a better risk-to-reward entry point.
The Trigger: A trade is only executed when price confirms the resumption of the trend by crossing back over the signal EMA after the pullback.
Key Features
Fixed Profit Targets: Replaced dynamic trailing stops with fixed Take Profit (TP) and Stop Loss (SL) levels based on ATR, ensuring exits aren't "hunted" by Gold's signature volatility spikes.
Clean Chart Interface: All moving average plots are hidden. The only visuals provided are the active TP/SL levels when a trade is live, keeping your workspace clutter-free.
Single-Trade Logic: The script includes a "One Trade Per Cross" gate, preventing the strategy from over-trading or "stacking" positions during choppy price action.
Settings & OptimizationATR Multipliers:
Stop Loss (SL): Default $2.0 \times ATR$. Protects against standard market noise.Take Profit (TP): Default $3.0 \times ATR$. Designed for a high Risk/Reward profile.Timeframe Recommendation: Optimized for 15m and 1H for swing scalping, or 5m for aggressive scalping.Instrument: Specifically tuned for Gold (XAU/USD), but applicable to other high-volatility pairs like GBP/JPY or NASDAQ.
Disclaimer
This script is for educational and backtesting purposes only. Past performance does not guarantee future results. Always practice proper risk management.
The Gold Smart Scalper V3 is a trend-following momentum strategy specifically optimized for XAU/USD (Gold). It focuses on catching "value pullbacks" within a strong trend, avoiding the noise of sideways markets. Unlike many scalpers that use lagging indicators for exits, this version uses fixed ATR-based targets to lock in profits during high-volatility moves common in Gold.
Core Methodology
The strategy operates on three layers of confirmation:
Macro Trend (HTF Filter): Uses a 50-period EMA to ensure trades are only taken in the direction of the higher-timeframe momentum.
The Value Zone: Instead of "chasing" green or red candles, the script waits for a pullback to the space between the 9 EMA and 21 EMA. This ensures a better risk-to-reward entry point.
The Trigger: A trade is only executed when price confirms the resumption of the trend by crossing back over the signal EMA after the pullback.
Key Features
Fixed Profit Targets: Replaced dynamic trailing stops with fixed Take Profit (TP) and Stop Loss (SL) levels based on ATR, ensuring exits aren't "hunted" by Gold's signature volatility spikes.
Clean Chart Interface: All moving average plots are hidden. The only visuals provided are the active TP/SL levels when a trade is live, keeping your workspace clutter-free.
Single-Trade Logic: The script includes a "One Trade Per Cross" gate, preventing the strategy from over-trading or "stacking" positions during choppy price action.
Settings & OptimizationATR Multipliers:
Stop Loss (SL): Default $2.0 \times ATR$. Protects against standard market noise.Take Profit (TP): Default $3.0 \times ATR$. Designed for a high Risk/Reward profile.Timeframe Recommendation: Optimized for 15m and 1H for swing scalping, or 5m for aggressive scalping.Instrument: Specifically tuned for Gold (XAU/USD), but applicable to other high-volatility pairs like GBP/JPY or NASDAQ.
Disclaimer
This script is for educational and backtesting purposes only. Past performance does not guarantee future results. Always practice proper risk management.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.