Nightrange Gold Breakout

Nightrange Gold Breakout is a rules-based Expert Advisor for MetaTrader 5. It trades one simple, well-known idea on Gold (XAUUSD) and USDJPY: the quiet overnight hours build a price range, and the European morning often breaks out of it. Everything in this description, including the losing years, comes from tests you can repeat yourself.

The idea in one paragraph

Between midnight and 07:00 server time, liquidity is thin and prices tend to move sideways. When London opens, volume returns and price often leaves that overnight range with momentum. The EA measures the range, places a buy stop above it and a sell stop below it, and lets the market decide the direction. There is no prediction, no indicator stack and no hidden logic.

How it trades

  • From 00:00 to 07:00 (server time) it records the high and low of each symbol.
  • At 07:00 it places a buy stop at the high and a sell stop at the low. The first one filled cancels the other.
  • The stop-loss is a fixed percentage of the actual fill price (0.70 % Gold, 0.50 % USDJPY). There is no take-profit: winners run until the stop-loss or 20:00.
  • Everything is closed at 20:00. No positions are held overnight or over the weekend.
  • After a stop-out it can re-enter, up to 3 entries per symbol per day.
  • Days with an unusually wide overnight range (news, gaps) are skipped automatically.
  • Real stop orders are sent to your broker, so entries do not depend on the EA reacting in time.

Risk controls

  • Risk per trade is a percentage of current equity (default 0.5 %), capped at 10× leverage.
  • Equity day stop: if the day is down 2.5R including open trades, everything is closed and the EA stops until the next day.
  • Daily breaker: no new entries once closed trades for the day reach −2R.
  • USD exposure cap: at most 2 positions with the same USD direction.
  • Before every order it checks free margin (including orders on the other symbol), the trading session, stop levels and broker limits.
  • Every position has a stop-loss from the moment it opens.

On-chart dashboard

A compact panel shows what the EA is doing, updated every second:

  • Session phase with a countdown: range building, trading window or closed.
  • Each symbol's overnight range, its width, and whether it passed the filter.
  • The pending buy and sell stop levels, or the open position with its stop-loss and live result in R.
  • Trades used today, the day's result (closed + open) and a bar showing how close the day stop is.
  • Breaker status, USD exposure, equity and floating profit, risk per trade in money, and the last event.

It redraws only what changed, can be minimized with one click, and switches itself off in non-visual backtests.

What to expect: please read before buying

The figures below are backtest results, not live trading results. Past results do not guarantee future results. A public live account will be linked on this page after launch.

Research backtest 2020–2026 (slippage included, compounding):

Risk per tradeGrowthYearlyMax drawdownLongest time below a previous high
0.5 % (default)2.1×11 %16 %2.9 years
1.0 %3.9×22 %30 %3.9 years

Year by year at 0.5 %: 2020 +6.5 %, 2021 −5.6 %, 2022 +11.4 %, 2023 −1.7 %, 2024 +9.2 %, 2025 +29.4 %, 2026 +32.0 % (to 12 Nov).

  • About 40 % of months lose money. Losing streaks are normal for a breakout system.
  • From mid-2020 to 2023/24 the account went nowhere. Most of the profit came in 2025–2026, when Gold trended strongly.
  • The edge per trade is small (about +0.04R on average). It needs months, not days.
  • MT5 Strategy Tester, 2023–2026, $10,000 at default inputs: $20,550, profit factor 1.31, maximum equity drawdown 8.3 %. The tester fills stop orders without slippage, so expect live results to be lower.

If you want steady monthly income, this is not the right product. If you want a transparent, rules-based breakout with controlled risk and a long test history, it may be.

How it was tested

  • Researched in Python on 2020–2026 one-minute data for both symbols.
  • Four sources of over-optimism were found and removed before release: a look-ahead in the daily breaker, a same-bar re-entry look-ahead, a wrong broker clock, and a data-gap artefact that created a fake worst day.
  • The EA was then compared with the research trade by trade on the broker's own data: 98.6 % of trades match in the Strategy Tester (2025–2026), and 98.5 % over 2023–2026.
  • Default risk was set to 0.5 % because at 1 % the historical drawdown reached 30 %.

What it is not

Not a martingale, grid, averaging or recovery system. Not a scalper. Not a news trader. One position per symbol at a time, always with a stop-loss.

Requirements

  • MT5, hedging or netting account. A broker with XAUUSD and USDJPY (symbol suffixes such as XAUUSD.m and the name GOLD are found automatically).
  • Server time on New York close (GMT+2 winter / GMT+3 summer), which most brokers use. If yours differs, adjust the session hours.
  • Balance: at 0.5 % risk the minimum lot needs about $6,000 for Gold and about $1,000 for USDJPY. Below that the EA skips the trade, unless you enable "MinLotIfBelow" (see inputs).
  • Strategy Tester: if the test deposit is too small for the minimum lot, the backtest trades the minimum lot anyway and the journal states the real risk ("TESTER ONLY … risks x % of equity"), so small-deposit backtests are not empty. Live trading skips those trades.
  • VPS recommended. Attach to one chart only (any symbol, any timeframe): it trades both symbols from there.

Getting started

  • Attach the EA to any one chart and allow algo trading.
  • Check the Experts tab for the start line, for example "started: [XAUUSD] [USDJPY] risk 0.50 %".
  • The dashboard shows the next step and a countdown. The first brackets appear at 07:00 server time.
  • To test it first, run the free demo in the Strategy Tester: XAUUSD, M15, "Every tick based on real ticks", 2023 to today, $10,000, default inputs.

Inputs (main ones)

  • Instruments: symbol names and on/off per symbol.
  • Session: range start (0), range end (7), close hour (20), server time.
  • Strategy: stop-loss %, maximum range width %, max entries per day (3).
  • Risk: risk % per trade (0.5), max leverage (10), MinLotIfBelow (off), MinLotMaxRiskX (3).
  • Portfolio: day stop (−2.5R), breaker (−2R), USD cap (2).
  • Execution: magic number, slippage tolerance, trade log file, close on removal (off).
  • Dashboard: show/hide, position and font size.

Support

The EA writes a CSV trade log with every entry, exit and reason, which makes questions quick to answer. Send a private message with your broker name and the log, and I will reply. Updates are free for buyers.

More from author
Fair Value Gap v1
Brian Mutuku Mwanthi
Fair Value Gap v1 marks every Fair Value Gap (FVG, also called an imbalance) on your MetaTrader 5 chart, extends each zone until price returns to it, and can alert you when a new gap forms. It is free, light on resources and works on any symbol and timeframe. What a Fair Value Gap is A Fair Value Gap is a three-candle pattern where the middle candle moves so fast that the wicks of the first and third candles do not overlap. The space between them is price that traded in one direction only. Many
FREE
MultiORB EA Prop Edition
Brian Mutuku Mwanthi
MULTI ORB EA - PROP FIRM EDITION with FOREX FACTORY NEWS FILTER THE ONLY MULTI-SESSION ORB EA WITH INTEGRATED FOREX FACTORY NEWS PROTECTION Pass your prop firm challenge with confidence using the most advanced Opening Range Breakout EA designed specifically for FTMO, FundedNext, The5ers, and other funded trader programs CUSTOM PRESET AT USER
MULTI-ORB v6.0.1 RETAIL EDITION    Aggressive Opening Range Breakout Trading System     NO NEWS FILTER - TRADE THROUGH ALL MARKET CONDITIONS WHAT IS OPENING RANGE BREAKOUT (ORB)? The Opening Range Breakout strategy trades price breakouts from established  market session ranges. This RETAIL EDITION is designed for aggressive traders  who want to capture high volatility moves during news events and major sessions. WHY RETAIL EDITION? SIMPLIFIED - Trade through news without fil
Tralalelo EA
Brian Mutuku Mwanthi
STOP TRADING ALONE. LET THE ALGORITHM HUNT PROFITS. TIRED OF MISSING THE MOVES? WATCHING PRICE FILL GAPS... WITHOUT YOU? MANUALLY MARKING FVGs AT 3 AM? GETTING STOPPED OUT BY NOISE? THIS EA DOES IT ALL. AUTOMATICALLY. 24/7. WHAT SMART MONEY KNOWS (AND YOU'RE ABOUT TO EXPLOIT) When institutions move billions, they leave GAPS in price. These "Fair Value Gaps" are like brea
Filter:
No reviews
Reply to review