Our daily loss limit was lying to us — a measurement

We run a small MT5 stack with a 1 % daily loss cap. It had been in place for months and we trusted it.

Replaying our own history, a day where every stop gaps at its instrument’s 99th percentile reaches 13.84 % of equity. Not 1 %.

The cause is simple once you see it: the limit counts the stop, not the jump through it. The governor admits a new entry while realized loss plus open stop-risk stays under the cap — and neither term knows what a gap does. So the day keeps admitting entries right up to the line, and then the gaps arrive.

Lowering per-trade risk does not fix it. At 0.25 % risk the bad day lands at 0.980 % after 9 entries; at 0.01 % risk it lands at 0.981 % after 121. Same place. The cap is the constraint, not the size.

One more thing that surprised us: minute bars understate gaps badly. Measured against tick quotes on gold, the bar-derived figure is about a quarter of the real one, and on a scheduled release the difference is larger still. If you have ever sized a gap from bar data, it is worth re-checking on ticks.

We rebuilt the control. Same replay, same formula, same configuration: 0.753 %. It shipped with 81 tests, and 12 of 12 deliberately reverted defects were caught.

To be clear about what this is not: this is risk, not edge. Our live book is 60 trades and negative. We have not found an edge and I am not claiming one.

If anyone has measured their own worst gapped day against their cap, I would like to compare numbers.

The cap that matters is the one your account is judged on, so measure that rather than planned stop risk. Prop-firm style rules usually measure daily loss on equity, so floating loss counts and not only closed trades. Gap and slippage losses are not in the stop-risk arithmetic, which is why your replay overshoots. Use HistoryDealsTotal and HistorySelect from the day's server-time start to rebuild a realised curve, add AccountInfoDouble(ACCOUNT_ EQUITY) sampled on every tick or at least every few seconds, and record the worst equity versus the day's starting balance or equity, whichever your firm uses. For the control, close or block new trades at a soft limit well under the hard one, for example 60-70% of it, so that a gapped stop still lands inside the rule. Also log the fill price minus the stop price on every stop-out, per instrument. Its 95th and 99th percentile gives you the real gap allowance, and tick data will show a bigger number than minute bars, as you found.
This is why I wouldn't take a "1% daily loss limit" at face value. What matters most is how it holds up when execution gets ugly. The 0.753% replay result is encouraging, but how does the rebuilt control handle gaps beyond the historical assumptions? That's where I'd want to see the next test

Whether your live strategy is currently profitable is a separate issue here. Controlling risk and proving an edge are different jobs, and improving one doesn't automatically solve the other.

Hey Mohamed,

i have it not measured in a replay. But, I have one real data point, and it matches yours. 

On a prop account I ran EAs with stops set so that the planed loss stayed inside the daily limit. It worked for about 1,5 years. Then one forex pair opened with a big gap, far past the stops, and the positions were closed at the first price. The limit was 5 %, the day ended round about at roughly 7%. 

What made it worse: a grid EA was running on the same account with open positions, so part of the daily room was already used by floating loss before the gap came. The gap didn´t have to do it alone. 

So yes, the limit counted the stops, not the jump, and not what else was open. Your "the cap is the constraint, not the size" is exactly what i learned that day.

And thanks for being upfront that the live book is negative. Thats rare here, and it makes the risk part easier to trust. 

Cheers,
Chris

Does your system use pending orders? If so, one extra replay case would be worth testing: the daily lock activates just as an existing pending order fills.

Check that the control catches the resulting position, confirms which cancellations and closes actually succeeded, and keeps entries blocked until the daily reset. Several pending orders filling together would also test whether their combined risk was reserved before they triggered.

This checks a separate failure path from slippage through the SL; it doesn’t solve the gap risk itself.
Abdullah Uygar Tuna #:
The cap that matters is the one your account is judged on, so measure that rather than planned stop risk. Prop-firm style rules usually measure daily loss on equity, so floating loss counts and not only closed trades. Gap and slippage losses are not in the stop-risk arithmetic, which is why your replay overshoots. Use HistoryDealsTotal and HistorySelect from the day's server-time start to rebuild a realised curve, add AccountInfoDouble(ACCOUNT_ EQUITY) sampled on every tick or at least every few seconds, and record the worst equity versus the day's starting balance or equity, whichever your firm uses. For the control, close or block new trades at a soft limit well under the hard one, for example 60-70% of it, so that a gapped stop still lands inside the rule. Also log the fill price minus the stop price on every stop-out, per instrument. Its 95th and 99th percentile gives you the real gap allowance, and tick data will show a bigger number than minute bars, as you found.

Our cap is measured on equity, so unrealised loss counts. It is evaluated before every order and on a 60-second timer, and it gates new orders — nothing closes a position on a breach; each position is bounded by its own stop. The pre-order check reserves each open position’s full stop distance plus its gap allowance before admitting anything new, and that allowance does not shrink as a position moves toward its stop. Your percentile method is the one we use: fill price minus stop price, per instrument, 99th percentile, from ticks — and yes, ticks give a materially larger number than minute bars.

Alex Holloway #:
This is why I wouldn't take a "1% daily loss limit" at face value. What matters most is how it holds up when execution gets ugly. The 0.753% replay result is encouraging, but how does the rebuilt control handle gaps beyond the historical assumptions? That's where I'd want to see the next test

Whether your live strategy is currently profitable is a separate issue here. Controlling risk and proving an edge are different jobs, and improving one doesn't automatically solve the other.

Here are the numbers you asked for. Multiplying every gap by 2, 3, 5, 10 and 20 while the system keeps its measured values, the worst modelled day reaches about 1.1, 1.4, 1.9, 3.2 and 5.8 times the limit. It first fails at about 1.08× the measured gap. The start-up check refuses if our measured factors rise more than about 14 %, but it reads our measurement file, not the market — closing that would need the per-minute jump measured continuously from live quotes, which we don’t do. We also measured what each mitigation costs: sizing on a higher percentile or lowering the daily limit both make the system refuse to start at all; halving per-trade risk cuts the stress day by nearly half and admits the same number of entries; one position at a time cuts it by about 4× for roughly 9 % of entries. The gaps are not yet tested out of sample — that’s the honest limit on all of it.

Chris K. #:

Hey Mohamed,

i have it not measured in a replay. But, I have one real data point, and it matches yours. 

On a prop account I ran EAs with stops set so that the planed loss stayed inside the daily limit. It worked for about 1,5 years. Then one forex pair opened with a big gap, far past the stops, and the positions were closed at the first price. The limit was 5 %, the day ended round about at roughly 7%. 

What made it worse: a grid EA was running on the same account with open positions, so part of the daily room was already used by floating loss before the gap came. The gap didn´t have to do it alone. 

So yes, the limit counted the stops, not the jump, and not what else was open. Your "the cap is the constraint, not the size" is exactly what i learned that day.

And thanks for being upfront that the live book is negative. Thats rare here, and it makes the risk part easier to trust. 

Cheers,
Chris

Chris, the grid EA detail is the part I had not named — I was looking at the gap alone, and you’re describing the day’s room already partly spent before it arrived. I’ve since measured that case specifically. Your numbers are the part that matters: a 5 % limit ending near 7 % is real money, after 1.5 years of the arithmetic looking fine. Mine is a replay; yours happened. One ask: may I cite your case — the 5 % to 7 % day and the grid EA — when I describe this problem to other people? By your forum name or anonymously, whichever you prefer. I’d rather point at a real account than at my own replay.

Sayed Ali Ordibehesht #:
Does your system use pending orders? If so, one extra replay case would be worth testing: the daily lock activates just as an existing pending order fills.

Check that the control catches the resulting position, confirms which cancellations and closes actually succeeded, and keeps entries blocked until the daily reset. Several pending orders filling together would also test whether their combined risk was reserved before they triggered.

This checks a separate failure path from slippage through the SL; it doesn’t solve the gap risk itself.

We place no pending orders — every order is a market order or a change to an open position’s stop or target, and a test asserts only one process can send orders. If someone else’s pending order fills on an instrument we trade, the system sees a position it did not open and refuses every new entry until it is gone; it neither manages nor closes it. On an instrument we don’t trade, it isn’t listed at all, and only its effect on account equity is seen — which the daily limit reads, since that limit is measured on equity. Both paths are now covered by tests rather than just by the code.

Mohamed Trading #:

Chris, the grid EA detail is the part I had not named — I was looking at the gap alone, and you’re describing the day’s room already partly spent before it arrived. I’ve since measured that case specifically. Your numbers are the part that matters: a 5 % limit ending near 7 % is real money, after 1.5 years of the arithmetic looking fine. Mine is a replay; yours happened. One ask: may I cite your case — the 5 % to 7 % day and the grid EA — when I describe this problem to other people? By your forum name or anonymously, whichever you prefer. I’d rather point at a real account than at my own replay.

Hi Mohamed,
sure, you can use it, but please anonymously. Just as described here, without naming the firm or the EAs.

Interesting that you measured the "room already used" case now. In my case nobody looked at the account as a whole, every EA only knew its own stops.
I think thats the real lesson, more than the gap itself.

Best regards
 Chris
Thanks, that clears up the pending-order case. Do your tests also cover a position from another EA on an unmonitored symbol, initially near break-even, then losing alongside your own positions? It could have little effect on equity when you admit a new trade, while still carrying substantial risk.

Have you included that combined loss in the replay, or is it outside the scope of your control?