Joshua Dunnink · Trading Systems

← Daybreak

DAYBREAK — user manual

Version 1.01 · XAUUSD · MetaTrader 5

What changed in version 1.01 - panel, chart labels, restart-safe

The panel and the chart (since 1.01)

A small panel in the top-left corner shows what the EA is doing, and the chart labels every level it waits at, every open trade's exit and every closed trade's result. Nothing is drawn in a plain Strategy Tester run; on a live chart and in the visual tester it refreshes every second. Inputs: InpPanel, InpDrawTrades, InpCleanChart (hides the grid while the EA runs and puts it back when it is removed), InpTextSize.

Line What it tells you
DAYBREAK 1.01 XAUUSD risk Medium what runs on this chart
Trades a break of yesterday's high or low the rule in one line, then the stop, target and trail
Trading - watching yesterday's high and low why it trades now - or Levels arm when the day's first 15-minute bar closes, Quiet yesterday ..., No new entries today: a US jobs-report day, Both levels are done for today
High 4210.50: live / Low 4100.20: traded today the state of each of today's levels: live, traded today, or not armed today
BUY 0.05 @ 4211.20 +12.40 USD / trails at 4215.10, best 4215.60 the open trade and where its trail sits (or where it starts)
Waiting for margin: next order needs 152.40 (red) your broker's margin holds orders back - shown only while the free margin is short
Closed today: 3 trades +12.40 USD / Last 7 days: ... this EA's own closed result (its magic number only, costs included)

3 buttons. Every action is sent by the EA itself and written to the Experts tab; a panel close carries the comment "... panel close". The second-click buttons need the same button again within 5 seconds.

Button What the EA does Clicks
Pause entries / Resume entries Pause: removes the resting orders and places no new ones; open trades keep their exits. The pause is saved on the account and survives a restart. Resume: orders return at the next check. one
Lock profit moves the winning trade's broker stop to the trail's current lock once the trail has armed, else to the entry. A losing trade is left alone and a stop is never loosened. two
Close all closes every trade of this EA at market, removes its orders and pauses entries (press Resume to trade again). two

On the chart: yesterday's high and low while they are live, as dotted lines labelled with the trigger price a break fires at; the open trade's trail start or current trail price. A closed trade shows as a dotted line from its entry to its exit, labelled with why it closed and its net result.

1. What it does, in plain words

DAYBREAK watches two prices every trading day: the high and the low of the previous day. If price breaks up through yesterday's high, it buys; if price breaks down through yesterday's low, it sells. Only one of those can happen per day per side, and only after the day's first M15 bar has closed — a level the market already passed before that bar closed is skipped for the day, because a break that already happened before the EA could see it is not a signal.

Every position carries a stop loss and a take profit measured from the level, not from the price you actually got filled at, so the risk on the trade is the same distance whatever the slippage was. Once the trade is far enough ahead, a trailing stop takes over and gives back only a fixed amount from the best price seen.

DAYBREAK holds at most one position at a time. There is no grid, no martingale, no averaging into a loser — every position stands on its own stop loss.

It skips new entries (not existing positions) on the day of a US jobs report, a Federal Reserve rate decision, and the few thinly-traded days around the year-end close. It also skips new entries on a day whose prior 24 hours moved too little — unless the break reaches into price nobody has traded in five days, which is let through on its own.

2. Installation (five minutes)

  1. Attach DAYBREAK to a gold chart (XAUUSD, XAUUSDp, GOLD.pro or your broker's spelling — any timeframe; the strategy reads the daily and M15 bars itself).
  2. Leave every input at its default. That default is the validated configuration.
  3. Set Risk level (section "1. Start here") to match your comfort: Low, Medium (default) or High.
  4. Allow algo trading, drag it onto the chart, done.

2a. The inputs at a glance

Section What you touch
1. Start here Account type, Settings profile, Risk level, virtual balance, max spread
2. Sides Allow buy / Allow sell
3. Prop-firm rules Only if you trade a funded/prop account with its own daily/max-loss numbers
4. When not to trade NFP / FOMC / year-end skips (leave on)
5. Safety Margin fit, jump-skip, account breaker, hard floor
[Custom] groups Only read when Settings profile = Custom

3. The only setting that matters: risk level

InpRisk sizes every trade as a percent of your account balance, per the trade's own stop distance. Figures: backtest, MetaTrader 5 Strategy Tester, real ticks, Low / Medium / High risk arms, BlackBull, 2025.01.02 → 2026.09.25, $10,000 deposit, fixed 250 ms execution delay, compounding.

Level Risk per trade BlackBull (real ticks, 2025.01.02→2026.09.25, $10,000)
Low 0.75% +23.4% net, max equity DD 2.11%
Medium (default) 1.5% +52.9% net, PF 2.49, max equity DD 4.23%
High 3.0% +132.8% net, max equity DD 8.41% (margin-fit shrinks the lot on a 1:20 gold account)
Custom your choice, or a fixed lot —

Higher risk grows the account faster and draws down harder. Medium is the validated default — raise it only if you have sat through the Low/Medium curves and are comfortable with the shape.

Custom sizing

Set Risk level = Custom, then either: - Risk percent — your own % of balance per stop, in "Custom risk %, per stop", or - Fixed lot — set "Custom sizing method" to Fixed lot and give the lot size in "Custom fixed lot".

3a. Prop-firm accounts: one choice

"Account type" (section 1) has three settings:

3b. Prop-firm rules: your firm's own numbers

All zero by default (off). Fill in only the ones your firm actually enforces:

3c. Losing runs: what to expect

Losses come in runs. In the backtests behind the risk table, five to seven consecutive stop-outs occurred about once a year (October 2025 and September 2026 in the 2025-2026 window). Each stop-out costs about one risk unit, so such a run costs roughly 3% at Low, 7-11% at Medium and 12-20% at High, depending on the broker's tick stream. No filter tested could tell these days from the profitable ones in advance; the risk level is the control. Pick the level whose run you can sit through.

4. Your first week

Watch the Experts log. On load you will see one banner line naming the account type, profile, risk level, sides, calendar skips, the range-gate floor and its status, margin-fit and jump-skip, and a second line with every bracket distance. A broker-profile line follows with your computed lot and its risk in account currency and percent.

5. Reading the chart and the journal

DAYBREAK does not draw objects on the chart. The journal prints: - DAYBREAK: entries held for <reason> — a calendar-day skip or a closed range gate. - DAYBREAK: lot reduced X -> Y to fit N% of free margin — the margin-fit sizer at work. - DAYBREAK: the buy/sell level was skipped - price had already jumped past the trigger — the jump-skip rule. - DAYBREAK: order admitted under the 5-day-zone rule — a trade the range gate would otherwise have held, let through because it broke into fresh five-day territory.

6. When it does not trade — and why that is usually right

Two levels a day, at most one trade each, only after the day's first M15 bar closes. Most days do not qualify: the level may already be behind price at the open (gapped over), the day's range may sit below the floor, or a calendar skip may be active. This is normal — the strategy trades roughly two handfuls of times a month, not every day.

7. Exit mechanics

8. Execution quality — what your broker adds

DAYBREAK sends a market order the instant a level breaks — not a resting pending order — so your broker's fill speed and slippage matter. A tight-spread, fast-fill broker gets you a fill closer to the level; a wide-spread broker gives back part of the edge to the spread itself, same as any breakout system.

9. Sizing and margin

Every risk level is capped by "Margin fit %" (default 95, always on): if the risk-sized lot would need more margin than that share of your free margin, the lot is shrunk to what fits, never refused outright. Gold on many brokers margins at 1:20 for a retail account whatever your account leverage — this is why High risk's real-world return is well below twice Medium's return.

10. Optimising (for advanced users)

Every input is exposed for research and GA use, but the compiled defaults ARE the validated configuration. Changing a [Custom] input without setting Settings profile = Custom does nothing — that is the point of the facade (see _proofs/PROOFS.md).

11. What is saved and what is not

Prop-firm rule state (daily/maximum-loss anchors) persists across a restart on a live or demo account via terminal global variables; the Strategy Tester always starts fresh. Nothing else is saved.

12. Troubleshooting

13. Final checklist and disclaimer

Backtest figures throughout this manual are MetaTrader 5 Strategy Tester runs on real broker ticks, labelled with their feed and window. They are not a promise of future results. Past performance, including in a backtest, does not guarantee future performance.

14. Reproduce the tests yourself

Every figure in this manual comes with the settings that produced it. Reproducing one takes a few minutes in MetaTrader 5 and needs no .set file.

By hand, in MetaTrader 5 (the BlackBull Medium row; open the Strategy Tester with Ctrl+R):

Step Setting
1 Expert: DAYBREAK - the Journal's first line must read DAYBREAK 1.00
2 Symbol: gold on your terminal (the row was measured on BlackBull, symbol XAUUSDp)
3 Timeframe: M15
4 Date: Custom period, 2025.01.02 to 2026.09.25
5 Modelling: Every tick based on real ticks
6 Deposit: 10,000 USD, leverage as your account
7 Execution delay: 250 ms (the Settings tab's delay field)
8 Inputs: leave every input at its default (Settings profile = Recommended, Risk level = Medium)

Expect 140 trades, net about +52.9 %, profit factor 2.49 and a maximum equity drawdown of 4.23 % (backtest, Medium risk, BlackBull, 2025.01.02 to 2026.09.25). On another broker the trade list is the same to the second and the profit differs: the trailing stop lives longer on some tick streams than on others, which is why this manual quotes three brokers, never one.

Complete reference — every input, its set-file key and default

Generated from the compiled source; enum defaults are the source names - the Inputs tab shows their plain labels. The presets in presets/ are complete sets of these inputs (UTF-16 LE with BOM, every enum as its integer).

Group Input Type Default Meaning
1. Start here InpAccountMode AccountMode ACCOUNT_PERSONAL Account type
1. Start here InpProfile StrategyProfile PROFILE_RECOMMENDED Settings profile
1. Start here InpRisk RiskLevel RISK_MEDIUM Risk level
1. Start here InpCustomLotMode CustomLotMode LOT_RISK_PCT Custom sizing method (Risk level = Custom)
1. Start here InpRiskPctCustom double 1.5 Custom risk %, per stop (Risk level = Custom)
1. Start here InpFixedLotCustom double 0.01 Custom fixed lot (Risk level = Custom)
1. Start here InpVirtualBalance double 0.0 Size as if the balance were this (0 = real)
1. Start here InpMaxSpreadUsd double 0.0 Max spread for a new order, USD (0 = off)
2. Sides InpAllowBuy bool true Allow buy trades (prior-day high breakout)
2. Sides InpAllowSell bool true Allow sell trades
3. Prop-firm rules (0 = rule off) InpPropAccountSize double 0 Account size (0 = balance when the EA first starts)
3. Prop-firm rules (0 = rule off) InpPropDailyLossPct double 0 Daily loss limit % (0 = off)
3. Prop-firm rules (0 = rule off) InpPropDailyPctOf PropPctOf PROP_PCT_OF_SIZE Daily loss limit is a % of
3. Prop-firm rules (0 = rule off) InpPropDailyFrom PropDayFrom PROP_DAY_HIGHER Daily loss is counted from
3. Prop-firm rules (0 = rule off) InpPropMaxLossPct double 0 Maximum loss limit % (0 = off)
3. Prop-firm rules (0 = rule off) InpPropMaxRule PropMaxRule PROP_MAX_FIXED Maximum loss limit type
3. Prop-firm rules (0 = rule off) InpPropTrailLock bool true A trailing limit stops rising at the account size
3. Prop-firm rules (0 = rule off) InpPropSafetyPct double 0.5 Act this many % of account size BEFORE each loss limit
3. Prop-firm rules (0 = rule off) InpPropTargetPct double 0 Profit target %: close all and stop for good (0 = off)
3. Prop-firm rules (0 = rule off) InpPropDayGainPct double 0 Best-day cap %: close all and pause for the day (0 = off)
3. Prop-firm rules (0 = rule off) InpPropDayStartHour int 0 Hour the firm's day starts, broker server time (0-23)
3. Prop-firm rules (0 = rule off) InpPropFridayCloseHour int 0 Friday: close all at this hour (0 = off)
3. Prop-firm rules (0 = rule off) InpPropResetState bool false New challenge, same login: true once
4. When not to trade InpAvoidNFPDays bool true Skip new entries on a US jobs-report day
4. When not to trade InpAvoidFOMCDays bool true Skip new entries on a Fed rate-decision day
4. When not to trade InpAvoidYearEnd bool true Skip new entries on the thin year-end days
5. Safety InpMarginFitPct double 95.0 Shrink the lot to fit this % of free margin (0=off)
5. Safety InpMaxJumpFrac double 0.5 Skip a level price already jumped past (0=off)
5. Safety InpMaxAccountDD double 0.0 Pause new entries after this % equity drawdown (0=off)
5. Safety InpHardFloorPct double 0.0 Stop for good after this % loss from the start (0=off)
6. Entry and exit [Custom] InpTrigOffsetUsd double 1.0 Fire this many $ before (+) or after (-) the level
6. Entry and exit [Custom] InpSLUsd double 5.0 Stop loss, $ from the level
6. Entry and exit [Custom] InpTPUsd double 50.0 Take profit, $ from the level (0 = none)
6. Entry and exit [Custom] InpTrailMode ENUM_TRAIL_MODE TRAIL_FIXED Trailing-stop style
6. Entry and exit [Custom] InpTrailArmUsd double 1.0 Profit, $, needed before the trail arms
6. Entry and exit [Custom] InpTrailKeep double 0.92 Proportional mode: fraction of profit kept
6. Entry and exit [Custom] InpTrailOffsetUsd double 0.0 Proportional mode: $ give-back offset
6. Entry and exit [Custom] InpTrailDistUsd double 0.50 Fixed mode: $ behind the best price
6. Entry and exit [Custom] InpTrailStepUsd double 0.10 Minimum stop improvement worth sending
6. Entry and exit [Custom] InpNeverBelowEntry bool false Trailed stop may never pass breakeven
7. Range gate [Custom] InpMinPrevDayRangePct double 2.0 Min prior-day range, % of price (0=off, gold only)
7. Range gate [Custom] InpAdmit5dZone bool true Admit a break into fresh 5-day territory
8. Panel and chart InpPanel bool true Show the control panel (Pause, Refresh orders, Lock profit, Close all)
8. Panel and chart InpDrawTrades bool true Describe the levels, orders and trades on the chart
8. Panel and chart InpCleanChart bool true Clean chart: hide the grid (put back when the EA is removed)
8. Panel and chart InpTextSize int 10 Text size of the panel and the chart labels (8-16)