OPEN-SOURCE SCRIPT

XAUUSD 1H โ€“ Bounce & Breakdown Strategy

88
๐Ÿš€ XAUUSD 1H โ€“ Breakout Momentum Strategy
๐Ÿ“– Overview

The Breakout Momentum Strategy is designed for XAUUSD (Gold/USD) on the 1-hour timeframe. It identifies powerful momentum breakouts above resistance (longs) and breakdowns below support (shorts), using a combination of EMA trend filtering, pivot levels, and ATR-based risk management.

This strategy is built for traders who prefer trend continuation setups rather than countertrend bounces โ€” perfect for capturing explosive moves in Gold.

โš™๏ธ Key Features

โœ… EMA Trend Confirmation โ€“ Filters only high-probability breakouts aligned with trend.
โœ… Pivot-Based Levels โ€“ Automatic support/resistance detection for breakout triggers.
โœ… ATR Stops & Targets โ€“ Adaptive risk management with TP1 + TP2 exits.
โœ… Smart Risk Control โ€“ Position sizing based on % equity risk.
โœ… Backtest Ready โ€“ Pre-configured with commission & slippage for realistic results.

๐ŸŽฏ Trading Logic

Bullish Breakout Entry

EMA50 > EMA200 (bullish bias)
Price closes above pivot resistance
Long entry with ATR stop & multi-target exits

Bearish Breakdown Entry
EMA50 < EMA200 (bearish bias)

Price closes below pivot support
Short entry with ATR stop & multi-target exits

๐Ÿ“Š Backtest Configuration

Symbol: XAUUSD (Gold/USD)

Timeframe: 1H

Initial Capital: $10,000
Risk Per Trade: 1% (adjustable)
Commission: 0.01% per side
Slippage: 2 ticks
These defaults can be modified to match broker conditions or your own strategy preferences.

โšก How to Use

Load the strategy on the XAUUSD 1H chart.
Run a backtest to see historical performance.
Adjust EMA lengths, ATR multipliers, and risk % for optimization.
Use alerts for real-time breakout trade signals if converting to an indicator.

๐Ÿ“Œ Notes

Educational only โ€“ not financial advice.
Past results donโ€™t guarantee future performance.
Always validate on multiple assets & timeframes.

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.