Strategies
BreakdownLevelDay (Khlystov / barabashkakvn) on spot gold: previous-trading-day high/low OCO stop breakout with fixed-percent SL/TP, XAUUSD.SPOTMETAL 1-HOUR
Outcome: Backtesting
XauBreakdownLevelDay
BreakdownLevelDay (Khlystov / barabashkakvn) on spot gold: previous-trading-day high/low OCO stop breakout with fixed-percent SL/TP, XAUUSD.SPOTMETAL 1-HOUR
Hypothesis
Spot gold is the closest supported market to the FX instrument in the source and is almost unused in the corpus (SPOTMETAL 0.0%). It also adds long+short (direction bucket 79% long-only) and keeps away from the over-mined BINANCE (55%) and the BCH/LTC Hyperliquid trend-follower graveyard. The mechanism is a session-anchored prior-day-extreme stop breakout with fixed brackets, not a moving-average crossover.
Implementation
MQL5 BreakdownLevelDay port on XAUUSD.SPOTMETAL 1h: at each SPOTMETAL trading-day completion, an OCO Buy Stop at prior-day high*(1+delta%) and Sell Stop at prior-day low*(1-delta%); on fill, OUO reduce-only SL stop and TP limit at sl_pct/tp_pct from the fill price. No breakeven/trailing; no new pair while a position is open; unfilled stops cancelled and replaced daily. 1x equity notional.
Iteration 2 fix for Layer 2: the linked OCO entry pair and OUO SL/TP pair are built as StopMarketOrder/LimitOrder objects (the order factory cannot set contingency links), which require the registered trader_id. The Layer-2 proxy has no trader (trader_id None), so these builders now return early when trader_id is None. Under the real engine (Layer 3, backtest, paper) trader_id is always set, so trading logic is unchanged. Signal logic and everything else are untouched.
Verification Results
Query orders_open() and orders_inflight() for this instrument and strategy, deduplicate by client_order_id, and inspect only working orders.
_my_orders() queries cache.orders() and then filters closed orders. This scans the accumulated order history on every bar and multiple times on fills, so execution cost grows with the backtest's lifetime despite the scalar range calculation. The short sandbox does not measure this full-history cost.
Iteration History
Analysis
BreakdownLevelDay
Analysis
Creating an Order - Freelance service at MQL5.com
Backtest and paper results are hypothetical. Trading involves risk of loss.