Skip to content
All library documents

Stochastic Daily Breakout Rules and Gold Backtest Design

Article MQL5 code base

Summary

This gold strategy uses a turn in the stochastic signal line to indicate a possible momentum shift, then waits for price to cross the previous day's high or low before entering with a stop order. It calculates its stochastic variant internally, using a close-to-close range with SMMA smoothing, and also uses Bollinger Bands. It holds one position at a time and sets stop loss and take profit to 1.9% of entry price.

The described XAUUSD hourly backtest spans July 2021 to September 2026 and reports 2,453 USD net profit, a 1.54 profit factor, 23.9% maximum equity drawdown, and 213 trades. The strategy was selected through an automated search and subjected to robustness checks, but the document does not provide the full test details for independently assessing those checks. Real tick data covered about one quarter of the period; ticks for the remainder were generated from minute data. Results depend on the stated broker, sizing, leverage, and backtest assumptions and do not establish future performance.

Key ideas

  • A stochastic signal-line turn identifies a possible momentum change, while the prior day's high or low confirms entry.
  • The EA uses pending stop orders and allows one open position at a time.
  • The stochastic is calculated internally with close-to-close range and SMMA smoothing, alongside Bollinger Bands.
  • The stated stop loss and take profit are each 1.9% of entry price.
  • The hourly gold backtest reports results for July 2021 through September 2026, but much of its tick data was generated from minute data.
  • Automated candidate search and robustness checks informed selection, though future results are not assured.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.