Joshua Dunnink · Trading Systems
Lamplighter artwork

Lamplighter

XAUUSD · H1 · MetaTrader 5 Expert Advisor

Coming soon. This Expert Advisor is in final testing and is not for sale yet. Its description, manual and research are published so you can follow it before release.

Read the manualHow it was built

Headline backtest

Profit factor 1.60 · worst equity drawdown 14.05% · 2,054 trades · return x10.86 on 10,000

Backtest, real ticks, BlackBull Markets, 2022-11-01 to 2026-10-09, default settings, version 1.04. The weakest of the live brokers tested, not the strongest.

Lamplighter balance curve (backtest)
Chart: the default-settings run whose figures are quoted here (BlackBull, lots growing with the balance); the lower panel is the dip below the running peak, including the quiet 2023 market.

Figures on this page come from the MetaTrader 5 Strategy Tester on real broker ticks. They are backtests, not live results.

The Lamplighter walks the same round on gold every day and lights four lamps, each at its hour: the morning range, the London open, a swing break and a pullback. Every lamp has its own stop loss. When the street is too quiet he leaves a lamp dark, and when the lamps keep blowing out he turns two of them down. A dark lamp is part of the design.

Lamplighter is an Expert Advisor for MetaTrader 5 (MT5) that trades gold (XAUUSD) with four independent strategies on one chart. Two of them work to the clock: they measure a range, then rest a buy stop above it and a sell stop below it at a fixed time of the server day. The other two work to price levels: they rest stop orders at a swing level or at a recent extreme and wait for price to come to them. The strategies do not share positions, orders or stops, and each has its own magic number (89860 to 89863 by default).

How a trade is made:

Morning Breakout. The EA measures the range of the early session. At 06:05 server time it places a buy stop above the range and a sell stop below it, each with a stop loss set at a fixed percentage of price. When one side fills, the other is cancelled. Once the trade has moved by the size of the session range, the stop goes to breakeven, and from there it follows price. A Morning trade still open at 17:55 server time is closed. Quiet-market protection, on by default, keeps the strategy out on days when the recent daily range is small compared with price.

London Open. The EA measures the overnight range and, at 09:55 server time, places a buy stop and a sell stop around it. The stop loss sits at the middle of the range and the target is the full range. Once the trade is in profit, the stop locks most of the best profit reached. When the range is too wide for its stop, London Open stands aside for the day, and quiet-market protection keeps it out on the days when gold's recent range is in the quietest third of its own past year.

Swing Breakout. A swing is an hourly bar whose high or low is more extreme than the bars on both sides of it. Swing Breakout finds the nearest swing high above price and the nearest swing low below price that no later hourly bar has traded through, and rests one stop order at each, so there is at most one buy side and one sell side. The stop loss is a fixed percentage of price. Once the trade is ahead, the stop follows price. A trade that does not follow through within minutes of its entry is closed by an early false-breakout exit.

Pullback. On days when a four-day extreme qualifies, the EA rests a stop order at the four-day high above price and at the four-day low below price, so a trade opens only if price comes back to that extreme and breaks it. The stop loss is a fixed percentage of price, and once the trade is ahead the stop follows price.

Orders that are not triggered expire after a few hours (the two range strategies) or after days to weeks (the two level strategies).

Protection:

Every order and every position carries a stop loss from the moment it exists.

The account stop protects the money you started with. It is measured on the account's equity (balance plus open profit and loss) against your starting balance - the balance when the EA first starts, or a figure you enter. When equity falls a set percentage below that starting balance, the EA closes every trade, deletes every order and stops until you press Resume on the panel. The default is fifty percent: the line below which the account is no longer the account you started. Set it tighter if you prefer; zero switches it off. The EA keeps its state through a terminal restart, so a restart neither places a day's orders twice nor forgets a tripped stop.

The news guard takes resting orders off the market and places none from 10 minutes before to 10 minutes after a high-impact US dollar release. It reads the terminal's economic calendar and falls back to a release table stored in the EA. Orders it took off are put back afterwards, unless their price was crossed meanwhile.

The spread guards make a new order wait while the spread is wider than a limit (0.60 in dollars by default), and take resting orders off while the spread blows out to four times its normal of the last hour.

Steady mode, on by default, watches how often the breakouts of the two range strategies have held over the last fifteen trading days. When that share falls into the lowest third of its own past year, Morning Breakout and London Open trade at half size until breakouts hold again. You can switch it off, or let those two strategies stand aside instead. On the broker's minimum lot there is nothing to halve, so it acts once the lot is 0.02 or more.

Quiet-market protection and the wide-range stand-aside are described above. Each guard shows on the chart panel.

What the EA does not do: no grid, no martingale, no averaging into a losing position, no position or order without a stop loss, no trading on news, no DLL, no external files.

Position size. One input, Risk level, sets the lot from the balance: Low is 0.01 lot per 4,000 of balance, Medium (the default) per 2,000, High per 1,000 and Hot per 500. Custom takes a fixed lot or your own balance per 0.01 lot. The lot grows in steps of the broker's lot step, and below the balance that buys one step every order is the broker's minimum lot. A maximum lot per order (5.0 by default) applies at every level.

Broker clock. Session times are set for a broker server on GMT+2 in winter and GMT+3 in summer. On another server, switch on "Adjust the session times" and enter your server's offset from GMT for winter and for summer; the strategies then fire at the same moments of the real day.

The chart panel. One status word (Trading, Paused, Closed, Algo off or Stopped), one row per strategy, a guard strip (News, Spread, Quiet, Steady) that lights when a guard acts, the money at the stops (what the open trades would cost if every stop were hit now), an account drawdown bar against the stop level, the closed result of today and of the last seven days, and two buttons: Pause or Resume, and Close all (two clicks; it also pauses new entries). Resume also clears a tripped account drawdown stop. Orders and the live stop of each trade are drawn on the chart.

What kind of market it needs. The backtested profit came mainly from the volatile, trending gold market of 2024 to 2026. In the quiet, sideways gold market of 2023 the same rules lost money for most of a year before recovering (backtest, MetaTrader 5 Strategy Tester, real ticks, BlackBull, 2022-11 to 2026-10). Lamplighter is built for a gold market that moves; it is not an all-weather system, and a return to a quiet, sideways gold market would be expected to bring a flat or losing stretch.

Small accounts. The smallest account is 500 at Risk level Hot. Started with 500 at Hot in November 2022, just before the quiet gold market of 2023, the account's equity went as low as 64 percent of its starting balance before it grew; started in July 2025 on a second broker, as low as 80 percent. The fifty percent account stop was never reached (backtest, MetaTrader 5 Strategy Tester, real ticks, version 1.03 at its defaults with Risk level Hot; BlackBull 2022-11-01 to 2026-10-09, Vantage 2025-07-04 to 2026-10-09; version 1.04 makes the same trades). The recommended start is 2,000 at the default Medium level, chosen for a fall of no more than about twenty percent: from 2,000 the deepest fall below a running high was 16.3 percent on BlackBull and 11.7 percent on Vantage, and equity went no lower than 91 percent of the start. The user manual's Minimum balance chapter gives every level.

Results. Default settings (Risk level Medium), deposit 10,000, lots growing with the balance: BlackBull 2022-11-01 to 2026-10-09, 2,054 trades, profit factor 1.60, relative equity drawdown 14.05 percent; Vantage 2025-07-04 to 2026-10-09, 708 trades, profit factor 1.65, relative equity drawdown 11.66 percent (backtest, MetaTrader 5 Strategy Tester, real ticks, version 1.04, 150 ms execution delay). Most of the money in both runs was made late in the window on larger lots, so the profit factor and the drawdown are the figures to compare. Like most breakout systems, it earns from a minority of trades that run: at a fixed 0.01 lot on BlackBull the top five percent of trades made more than the whole net result, and they fell on 97 different days in 30 of the 48 months; the five largest winning trades made 13 percent of it.

Family note. Other products in this line also trade gold; Lamplighter differs from each of them mechanically.

Requirements: MetaTrader 5, XAUUSD, a hedging account, algorithmic trading enabled, a VPS or an always-on PC (the orders rest on the broker's server, but the trailing stops, the false-breakout exit, the end-of-day close of Morning trades and the account stop run inside the EA).

Frequently asked questions

Q: Which broker and account type does Lamplighter need? A: A gold account with reasonable spreads, on a hedging account: the four strategies hold their own positions at the same time, and Swing Breakout and Pullback can hold a buy and a sell together. The session times assume a server on GMT+2 in winter and GMT+3 in summer; for another server use the Broker clock inputs.

Q: What is the minimum deposit? A: 500, at Risk level Hot. In the backtests a 500 account at Hot survived every window tested, with its equity at worst 64 percent of the start (backtest, MetaTrader 5 Strategy Tester, real ticks, BlackBull 2022-11 to 2026-10). The recommended starting balance is 2,000 at the default Medium level: from 2,000 the deepest fall below a running high stayed under twenty percent. With gold near 4,100 and leverage 1:30, six open positions at 0.01 lot would need about 820 of margin; a smaller account sees the later orders refused. The user manual's Minimum balance chapter gives the tested figures with their data source.

Q: Which chart and timeframe do I attach it to? A: Any gold chart on any timeframe. The strategies read their own bars and the broker's clock.

Q: Which setting should I change first? A: Risk level. It sets the lot per balance: Low, Medium (default), High, Hot or Custom. Every other input can stay at its default.

Q: Does it use a grid, martingale or averaging down? A: No. Every order carries a stop loss, a losing trade is closed at its stop, and nothing is added to a position that is behind.

Q: Why does it not trade every day? A: Morning Breakout and London Open sit out a quiet day, London Open also stands aside when its range is too wide for its stop, Swing Breakout and Pullback place orders only when a level qualifies, no order rests on the market around a high-impact US dollar release, and a new order waits while the spread is wide. A day with no trade is the design working.

Q: What is steady mode? A: A protection that is on by default. When the range breakouts of the last weeks have kept failing, the two range strategies trade at half size until breakouts hold again. It reads the market, not the EA's own results. You can switch it off, or let those two strategies stand aside instead.

Q: What does the account drawdown stop do? A: If the account's equity falls the set percentage (fifty by default) below your starting balance, the EA closes all of its trades, deletes its orders and stops. The panel then reads Stopped until you press Resume, which restarts it with today's equity as the new starting balance. Profit made since the start does not count against you: the stop looks at the money you started with, not at the best day. Zero switches it off.

Q: Does it work in every gold market? A: No. The backtested profit came mainly from the volatile, trending gold market of 2024 to 2026, and the same rules lost money for most of 2023, a quiet, sideways year, before recovering. Expect long flat or losing stretches in a market like that.

Q: Can I use it on a prop-firm challenge? A: It has no prop-firm rule inputs. Its account stop is measured from the starting balance, which is not the same thing as a firm's daily or maximum loss rule, so check your firm's rules before using it on a challenge.

Q: Do I need a VPS? A: A VPS or an always-on computer is recommended. The stop loss of every order sits on the broker's server, but the trailing stops, the early exit, the end-of-day close of Morning trades and the account stop need the EA running.

Q: Can I backtest it myself? A: Yes. It needs no set file. Run it in the MetaTrader 5 Strategy Tester on "Every tick based on real ticks" on a gold symbol; the user manual's last chapters give the settings.

Evidence

equity BLACKBULL (backtest chart)
equity BLACKBULL - Strategy Tester, real ticks, backtest