Oriel Gold Window
- Uzmanlar
- Sürüm: 1.0
- Etkinleştirmeler: 5
Oriel Gold Window — Version 1.00
Original MetaTrader 5 Expert Advisor for gold (XAUUSD) on the H1 timeframe. After the London cash open it measures the first two completed H1 bars. If that window is a range expansion versus ATR and it closes in one direction, the EA waits for a same-day pullback that tags the midpoint of the impulse and then enters in the impulse direction. A hard stop is attached to every order, beyond the impulse extreme. One new position per day. No grid, no martingale, no averaging and no lot escalation. Signals are always evaluated on H1, even if the chart period is different.
IMPORTANT — HONEST RESULTS DISCLOSURE
In my own Strategy Tester run this version LOST money on 12 months of real ticks on gold. I did not tune the defaults. It is offered as a transparent, risk-controlled rule-set to test, study and run on your own broker data — not as a profitable system. Please run the free demo and your own backtests before buying. No profit is promised or implied.
Rules
All decisions use completed H1 bars and the broker's SERVER clock. Default London open hour is 10:00 server time, which matches 08:00 London on many GMT+2 / GMT+3 brokers; change LondonOpenHour if your server is different. The two H1 bars that open at that hour must have a combined high-low of at least 1.0 x ATR(14), a net close in one direction, and (by default) each bar closing in that same direction. The retest is a later same-day H1 bar that touches the impulse midpoint (plus a 0.20 ATR zone) and closes back through it in the impulse direction. Entry is at market on the next bar. No new entries from 18:00 server time, and none from 16:00 on Friday. Open trades are flattened from 20:00 on Friday.
Exits: the stop sits past the impulse extreme plus 0.10 ATR. The take profit is 1.5 times the stop distance. After 1.0R the stop moves to +0.15R; after 1.2R it trails 0.80R behind price in steps of at least 0.10R. A time stop closes the trade after 48 H1 bars. Stops are only moved in the profitable direction and only after stop-level and freeze-level checks; a move that would be too close to the market is deferred.
Safeguards
Spread may not exceed 15% of the stop distance (optional absolute cap is off by default). Maximum one new trade per day, a 1-bar cooldown after a close, and a 3% equity daily-loss halt that blocks new entries and, by default, flattens the open position. Lot size is 0.75% equity risk, capped at 1.50%, calculated with OrderCalcProfit including slippage and rounded down to the volume step. If even the minimum lot exceeds that budget, the minimum lot is used ONLY when its modelled stop loss is at most 2% of equity (input MaxMinLotRiskPct); otherwise the trade is skipped and the journal says "not enough money". Margin use is limited to 20% of free margin with a 300% projected margin-level floor. Volume min/max/step, symbol volume limit, trade mode, session and tick size are checked. On netting accounts a foreign position or order on the symbol blocks entry. No DLLs, no web requests, no external data.
Actual test results — all from the MT5 Strategy Tester, JustMarkets-Demo2 history
Baseline, v1.00 defaults (the listed result): XAUUSD.m, H1, every tick based on real ticks (history quality 100% real ticks; 78,577,222 ticks, 5,887 bars), 2025-11-01 to 2026-11-01 (last deal 2026-10-29 18:11:54 server time), deposit USD 10,000, leverage 1:100, hedging account, all inputs set explicitly.
Net profit -449.04 USD | profit factor 0.80 | expected payoff -6.80 USD | maximal equity drawdown 768.58 USD (7.47%) | maximal balance drawdown 699.48 USD (6.82%) | 66 trades | 43.94% winning (29 profit, 37 loss) | average win 61.73, average loss -60.52 USD | long 34 trades (44.12% won), short 32 trades (43.75% won). There were no trade-request errors and no stop-out in this run.
No tuning: these are the compiled default inputs. I did not run in-sample / out-of-sample fitting passes.
Netting / small-deposit local checks (v1.00 defaults, 2025-11-01 to 2026-11-01):
XAUUSD D1 chart, netting, USD 1,000, 1-minute OHLC model: net -141.33 USD, PF 0.40, equity DD 15.01%, 24 trades (all at the minimum lot). 63 signals were skipped with a "not enough money" log because the modelled stop on 0.01 lots exceeded 2% of equity.
EURUSD H1 chart, netting, USD 1,000, 1-minute OHLC model: net +32.99 USD, PF 1.21, equity DD 3.07%, 74 trades. This window happened to be slightly profitable on EURUSD. That is a local execution check, not a claim that the system is a forex EA or that this result will repeat.
XAUUSD H1, netting, USD 1,000, 100% real ticks: net -145.22 USD, PF 0.40, equity DD 15.37%, 24 trades (all at the minimum lot), 63 risk skips. No stop-out and no failed order sends occurred in these runs. These are my own local checks, not the official MQL5 Market validation.
Spread, session time and small accounts
Gold stops here are the width of a two-hour London impulse, so spread, slippage, commission and gaps still matter, though less than on an M1 scalper. Tester fills are more favourable than live fills. My figures use one demo broker's prices. Your broker, account type, swap, commission and server timezone will differ. Set LondonOpenHour to your broker's clock so that it matches the London cash open, and use a low-spread account.
On USD 1,000 gold accounts the 0.01 minimum lot often risks more than 0.75% (up to the 2% cap, and slippage or gaps can make a loss larger). Wide impulse days are skipped entirely. Drawdown in my USD 1,000 gold runs was about 15%. Set MaxMinLotRiskPct to 0 to never force the minimum lot.
Key inputs
LondonOpenHour, ImpulseBars, ATRPeriod, ExpansionATR, RequireBarAgreement, RetestTolATR, EntryCutoffHour, FridayLastEntryHour, FridayFlattenHour, EnableLong, EnableShort, StopBufferATR, TargetR, BreakEvenR, BreakEvenLockR, TrailStartR, TrailDistR, TrailStepR, MaxHoldBars, MaxSpreadPoints, MaxSpreadFractionOfStop, CooldownBars, RiskPercent, HardStopRiskPercent, MaxMinLotRiskPct, MaxTradesPerDay, DailyLossPercent, FlattenOnDailyHalt, MaxFreeMarginUsePercent, MinMarginLevel, SlippagePoints, MagicNumber. Use a unique magic number and do not share a netted symbol with another system.
Risk warning
Trading leveraged products such as gold carries a high risk of loss and is not suitable for everyone. Backtests are historical simulations, were NOT profitable on gold in this case, and are no assurance of live results. Past performance does not predict future results. No profit, win rate or drawdown limit is guaranteed. The daily-loss halt does not guarantee a maximum loss. Test on a demo account first and only risk money you can afford to lose.
Screenshots are rendered information panels built from the Strategy Tester numbers, not terminal screenshots.
Original MetaTrader 5 Expert Advisor for gold (XAUUSD) on the H1 timeframe. After the London cash open it measures the first two completed H1 bars. If that window is a range expansion versus ATR and it closes in one direction, the EA waits for a same-day pullback that tags the midpoint of the impulse and then enters in the impulse direction. A hard stop is attached to every order, beyond the impulse extreme. One new position per day. No grid, no martingale, no averaging and no lot escalation. Signals are always evaluated on H1, even if the chart period is different.
IMPORTANT — HONEST RESULTS DISCLOSURE
In my own Strategy Tester run this version LOST money on 12 months of real ticks on gold. I did not tune the defaults. It is offered as a transparent, risk-controlled rule-set to test, study and run on your own broker data — not as a profitable system. Please run the free demo and your own backtests before buying. No profit is promised or implied.
Rules
All decisions use completed H1 bars and the broker's SERVER clock. Default London open hour is 10:00 server time, which matches 08:00 London on many GMT+2 / GMT+3 brokers; change LondonOpenHour if your server is different. The two H1 bars that open at that hour must have a combined high-low of at least 1.0 x ATR(14), a net close in one direction, and (by default) each bar closing in that same direction. The retest is a later same-day H1 bar that touches the impulse midpoint (plus a 0.20 ATR zone) and closes back through it in the impulse direction. Entry is at market on the next bar. No new entries from 18:00 server time, and none from 16:00 on Friday. Open trades are flattened from 20:00 on Friday.
Exits: the stop sits past the impulse extreme plus 0.10 ATR. The take profit is 1.5 times the stop distance. After 1.0R the stop moves to +0.15R; after 1.2R it trails 0.80R behind price in steps of at least 0.10R. A time stop closes the trade after 48 H1 bars. Stops are only moved in the profitable direction and only after stop-level and freeze-level checks; a move that would be too close to the market is deferred.
Safeguards
Spread may not exceed 15% of the stop distance (optional absolute cap is off by default). Maximum one new trade per day, a 1-bar cooldown after a close, and a 3% equity daily-loss halt that blocks new entries and, by default, flattens the open position. Lot size is 0.75% equity risk, capped at 1.50%, calculated with OrderCalcProfit including slippage and rounded down to the volume step. If even the minimum lot exceeds that budget, the minimum lot is used ONLY when its modelled stop loss is at most 2% of equity (input MaxMinLotRiskPct); otherwise the trade is skipped and the journal says "not enough money". Margin use is limited to 20% of free margin with a 300% projected margin-level floor. Volume min/max/step, symbol volume limit, trade mode, session and tick size are checked. On netting accounts a foreign position or order on the symbol blocks entry. No DLLs, no web requests, no external data.
Actual test results — all from the MT5 Strategy Tester, JustMarkets-Demo2 history
Baseline, v1.00 defaults (the listed result): XAUUSD.m, H1, every tick based on real ticks (history quality 100% real ticks; 78,577,222 ticks, 5,887 bars), 2025-11-01 to 2026-11-01 (last deal 2026-10-29 18:11:54 server time), deposit USD 10,000, leverage 1:100, hedging account, all inputs set explicitly.
Net profit -449.04 USD | profit factor 0.80 | expected payoff -6.80 USD | maximal equity drawdown 768.58 USD (7.47%) | maximal balance drawdown 699.48 USD (6.82%) | 66 trades | 43.94% winning (29 profit, 37 loss) | average win 61.73, average loss -60.52 USD | long 34 trades (44.12% won), short 32 trades (43.75% won). There were no trade-request errors and no stop-out in this run.
No tuning: these are the compiled default inputs. I did not run in-sample / out-of-sample fitting passes.
Netting / small-deposit local checks (v1.00 defaults, 2025-11-01 to 2026-11-01):
XAUUSD D1 chart, netting, USD 1,000, 1-minute OHLC model: net -141.33 USD, PF 0.40, equity DD 15.01%, 24 trades (all at the minimum lot). 63 signals were skipped with a "not enough money" log because the modelled stop on 0.01 lots exceeded 2% of equity.
EURUSD H1 chart, netting, USD 1,000, 1-minute OHLC model: net +32.99 USD, PF 1.21, equity DD 3.07%, 74 trades. This window happened to be slightly profitable on EURUSD. That is a local execution check, not a claim that the system is a forex EA or that this result will repeat.
XAUUSD H1, netting, USD 1,000, 100% real ticks: net -145.22 USD, PF 0.40, equity DD 15.37%, 24 trades (all at the minimum lot), 63 risk skips. No stop-out and no failed order sends occurred in these runs. These are my own local checks, not the official MQL5 Market validation.
Spread, session time and small accounts
Gold stops here are the width of a two-hour London impulse, so spread, slippage, commission and gaps still matter, though less than on an M1 scalper. Tester fills are more favourable than live fills. My figures use one demo broker's prices. Your broker, account type, swap, commission and server timezone will differ. Set LondonOpenHour to your broker's clock so that it matches the London cash open, and use a low-spread account.
On USD 1,000 gold accounts the 0.01 minimum lot often risks more than 0.75% (up to the 2% cap, and slippage or gaps can make a loss larger). Wide impulse days are skipped entirely. Drawdown in my USD 1,000 gold runs was about 15%. Set MaxMinLotRiskPct to 0 to never force the minimum lot.
Key inputs
LondonOpenHour, ImpulseBars, ATRPeriod, ExpansionATR, RequireBarAgreement, RetestTolATR, EntryCutoffHour, FridayLastEntryHour, FridayFlattenHour, EnableLong, EnableShort, StopBufferATR, TargetR, BreakEvenR, BreakEvenLockR, TrailStartR, TrailDistR, TrailStepR, MaxHoldBars, MaxSpreadPoints, MaxSpreadFractionOfStop, CooldownBars, RiskPercent, HardStopRiskPercent, MaxMinLotRiskPct, MaxTradesPerDay, DailyLossPercent, FlattenOnDailyHalt, MaxFreeMarginUsePercent, MinMarginLevel, SlippagePoints, MagicNumber. Use a unique magic number and do not share a netted symbol with another system.
Risk warning
Trading leveraged products such as gold carries a high risk of loss and is not suitable for everyone. Backtests are historical simulations, were NOT profitable on gold in this case, and are no assurance of live results. Past performance does not predict future results. No profit, win rate or drawdown limit is guaranteed. The daily-loss halt does not guarantee a maximum loss. Test on a demo account first and only risk money you can afford to lose.
Screenshots are rendered information panels built from the Strategy Tester numbers, not terminal screenshots.
