Gold Night Range Breakout
- Experts
- Versione: 1.3
- Attivazioni: 10
How it works
Gold Night Range Breakout trades XAUUSD after the quiet night session. It measures the high and low of the night range, then places one stop order in the direction of the daily trend. It uses no martingale, no grid and no averaging. Every trade has a stop loss.
The range is built from M5 bars between 00:00 and 08:00 server time. If the previous daily close is above the EMA 50, only a buy stop is placed at the range high. If it is below, only a sell stop is placed at the range low. If the opposite side of the range breaks first, the day is skipped.
The stop loss is the other side of the range. The take profit is 3 times the stop distance. At +0.5 times the stop distance, the stop moves just past entry. Any open position is closed at 22:00 server time, and unfilled orders are removed at 16:00. The EA opens at most one trade per day.
Which account to start with
Recommended: USD hedging account with $10,000 or more at the default 1% risk. The EA skips a day when the minimum lot would risk more than RiskPercent, and at recent gold prices the stop is often wide. This is why smaller accounts trade much less.
Trades opened in the same 12 month test at 1% risk: $1,000 opened 0 trades, $2,000 opened 2, $3,000 opened 13, $5,000 opened 75 and $10,000 opened 113.
$3,000 to $10,000: you can raise RiskPercent to 3 to take the same trades, but losses and drawdown are also about three times larger. Below $3,000 is not recommended.
Installation
1. Open one XAUUSD chart. M15 was used in testing. The EA reads the M5 and D1 data itself.
2. Attach the EA and enable Algo Trading.
3. Check your broker's server time. The default hours assume New York time +7 (GMT+2 in winter, GMT+3 in summer). On a different server time, shift RangeStartHour, RangeEndHour, EntryEndHour and CloseHour.
4. Run it on a demo account for one to two months before using real money.
Main settings
RiskPercent: risk per trade as a percent of balance. Default 1.
AllowMinLotOverRisk: trade the minimum lot even if it exceeds RiskPercent. Default false.
MaxRiskPercentHard: upper limit of risk when the option above is on. Default 3.
TakeProfitR: take profit as a multiple of the stop distance. Default 3.
BreakEvenR: profit at which the stop moves to entry. Default 0.5.
MaxSpreadPoints: market entries are skipped above this spread. Default 80.
Magic: identifies this EA's orders. Change it when running with other EAs.
Backtest results
These are Strategy Tester results, not live trading. All tests: XAUUSD M15, one demo server of one broker, leverage 1:500, default settings unless stated. Results depend on the broker's prices and costs.
2025-10-14 to 2026-10-24, real ticks, history quality 100%, deposit $10,000, risk 1%: net profit +$1,763.04, profit factor 1.77, 113 trades, equity drawdown 4.09%.
2025-10-14 to 2026-10-24, real ticks, history quality 100%, deposit $10,000, risk 3%: net profit +$8,316.95, profit factor 1.78, 123 trades, equity drawdown 12.87%.
2025-10-14 to 2026-10-24, real ticks, history quality 100%, deposit $5,000, risk 1%: net profit +$540.81, profit factor 1.75, 75 trades, equity drawdown 5.11%.
2025-10-14 to 2026-10-24, real ticks, history quality 100%, deposit $3,000, risk 3%: net profit +$1,932.36, profit factor 1.79, 113 trades, equity drawdown 11.04%.
2023-08-15 to 2025-10-14, 1 minute OHLC, history quality 30%, deposit $10,000, risk 1%: net profit +$5,954.56, profit factor 1.80, 248 trades, equity drawdown 6.18%.
The 2023 to 2025 test has low history quality, so it is less reliable than the real tick test. The rules were researched on data from 2023-08 to 2025-06, so that part of the history is not an independent check.
Risks
Past test results do not predict future results. Trading gold can lose money, and gaps or slippage can make a loss larger than the stop. The tests come from a period when gold mostly rose, and the EA has not been tested in a long falling market. The EA was researched on XAUUSD only. It lost money in short tests on EURUSD and GBPUSD, so use it on gold.
