Gold SR Breakout ATR MT5
- Experts
- Renato Alonso Puente Insuasti
- Version: 1.130
- Activations: 10
Gold SR Breakout ATR MT5
Breakout Expert Advisor for XAUUSD (Gold) on M1 that trades Donchian Support/Resistance on closed candles and sizes positions by ATR-based risk %. It includes an optional EMA trend filter, volatility/spread guardrails, and smart management (Break-Even by R, optional ATR trailing threshold, and a TP ratchet that locks progress). An independent Asian Range breakout (OCO) module is provided with its own MAGIC so both engines can run in parallel without conflicts.
Recommended environment
-
Symbol / Timeframe: XAUUSD – M1 (primary market for this EA)
-
Account leverage: 1:500 recommended (1:200 or higher works; 1:500 gives more margin headroom for ATR-based sizing)
-
Account type: Hedging or netting, MT5
-
No DLLs or external licensing. Broker-aware normalization of price/volume and stop/freeze checks.
How it trades (core logic)
-
Donchian S/R (closed bars): Breakout beyond recent High/Low with ATR buffer; optional retest entry.
-
Risk % sizing (ATR): Position volume is computed from distance to SL, tick size/value, and volume step/min/max.
-
Filters:
-
EMA trend (HTF): Only-long above EMA / Only-short below EMA (configurable).
-
Session window (optional).
-
Volatility & cost: Minimum ATR in points and Spread/ATR ratio ceiling.
-
-
Management:
-
Break-Even by R with ATR offset.
-
ATR trailing that starts only after a configurable multiple of ATR has been gained.
-
TP ratchet: dynamically pushes TP forward every ATR step and keeps a buffer.
-
-
Strategy B – Asian Range (OCO): Builds the Asian session range, places OCO stop orders with ATR padding and cancels the opposite on fill or at time expiry (independent MAGIC).
Quick start
-
Attach the EA to XAUUSD M1.
-
Default set is conservative and validation-friendly.
-
In Strategy Tester use Every tick based on real ticks.
-
If you run both engines, keep different MAGIC numbers (already set).
Key inputs (suggested defaults for XAUUSD M1)
-
S/R: SR_Period=450 , SR_Buffer_ATR=0.60 , UseRetest=true , RetestMaxBars=50
-
Risk/Stops: RiskPercent=1.0 , ATRPeriod=13 , ATR_SL_Mult=2.0
-
Filters: UseTrendFilter=true , TrendTF=H12 , TrendEMAPeriod=200 , UseSessionFilter=false
-
Volatility/Cost: UseVolFilter=true , Min_ATR_Points=50 , Max_Spread_to_ATR_Rat=0.25
-
Management: UseBreakEven=true , BE_Trigger_R=1.9 , BE_Offset_ATR=0.15 , optional ATR trailing and TP ratchet
-
Asian Range B: ARB_Enable=true , ARB_OneTradePerDay=false , ARB_SessionStartHour=1 , ARB_SessionEndHour=5 , ARB_EntryValidUntilHour=12 , ARB_Buffer_ATR_mult=0.15
Notes and compliance
-
Works safely on other symbols/TFs (it simply won’t trade if conditions aren’t met).
-
Results depend on broker conditions, symbol liquidity and your risk settings. No guarantee of profits.
-
Support only via the MQL5 comments section.