Our daily loss limit was lying to us — a measurement - page 2

[Deleted]
Sayed's case names the remaining hole precisely: an equity check measures where a foreign position is, not where it can go. A position from another EA sitting near breakeven uses almost no room at admission, yet it can still lose its full stop distance plus its gap allowance alongside your own positions, and on a gold news release those gaps arrive together rather than one at a time. The fix I would use is to make the governor enumerate every open position, regardless of magic number or symbol, and reserve stop distance plus gap allowance for each one before admitting anything new. If a foreign position has no stop, that is the honest signal to block new entries until it is gone, since its downside is uncapped. One replay case worth adding is exactly Sayed's: a breakeven foreign position plus your own positions, all gapped at once, with the assertion that the worst day stays inside the cap. That turns the account-level view Chris learned the hard way into a test rather than a hope.
Chris K. #:
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 Chris — anonymous, exactly as you described it. No firm, no EA
names.

And you're right that the real lesson is the account-level view, not the
gap itself. That's the part I built.

Who should I be talking to about this? A prop firm's risk desk is my
guess — you've been inside one, so you'd know better than me.
Mohamed Trading #:
Thanks Chris — anonymous, exactly as you described it. No firm, no EA
names.

And you're right that the real lesson is the account-level view, not the
gap itself. That's the part I built.

Who should I be talking to about this? A prop firm's risk desk is my
guess — you've been inside one, so you'd know better than me.
Hi Mohamed,

one thing I have to correct. i was never inside a prop firm, I only traded on one of their accounts. So I really don't know how their risk desk works or who decides there.

What I can say is who got hurt in my case. People like me, who run more than one EA on the same account, each with its own stops and nobody watching the total. Most of them only notice it after the first breach.

Good luck with it :)
Chris
atif Aliza #:
Sayed's case names the remaining hole precisely: an equity check measures where a foreign position is, not where it can go. A position from another EA sitting near breakeven uses almost no room at admission, yet it can still lose its full stop distance plus its gap allowance alongside your own positions, and on a gold news release those gaps arrive together rather than one at a time. The fix I would use is to make the governor enumerate every open position, regardless of magic number or symbol, and reserve stop distance plus gap allowance for each one before admitting anything new. If a foreign position has no stop, that is the honest signal to block new entries until it is gone, since its downside is uncapped. One replay case worth adding is exactly Sayed's: a breakeven foreign position plus your own positions, all gapped at once, with the assertion that the worst day stays inside the cap. That turns the account-level view Chris learned the hard way into a test rather than a hope.
You named the case we don't cover. Numbers rather than my opinion.

The check lists positions one traded instrument at a time, never the
whole account — so a position on an instrument we don't trade reaches it
only as equity, and 50 lots gets the same decision as 0.25. On our
13-day record with a real GBPUSD path, a foreign long breaks 11 of 13
days at 3 lots or less; the smallest that broke one was 0.08 lots.

One I hadn't considered: a foreign position in profit offsets a loss
we've already taken, so an order that would be refused gets admitted —
it then returns to break-even and the day still breaks.

Had the check seen it, its existing rules would all have refused. So
this is about what it enumerates, not a missing rule. That's the change
being made.

Send more cases like this. You name the ones nobody models; I can run
any of them through the replay and come back with numbers.
Late to this, but one data point on the "minute bars understate" part.

Testing an equity-based daily lock (100,000 account, 5% limit, lock at 90% of it): with "1 minute OHLC" the day closed at 105% of the limit, with real ticks it locked at 90.0% (−4,501 of −5,000). Same code, same day. On bars the lock simply saw the drop too late.

On atif's point about news gaps arriving together: reserving allowance for them is one answer, being flat is the other. Closing positions a few minutes before high-impact news and before the Friday close removes the scheduled part of that tail, and what is left to budget for is the surprise gaps only. Same idea at the soft limit: close what is open, not just block new entries, since the open risk is what gaps through.

Mohamed, in your 13.84% day, how much of it came from scheduled releases?
Sayed Ali Ordibehesht #:
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?
Sayed — the measurement above was for your case; it landed under
atif's post because he had already picked it up. Short version: the
check never lists the whole account, so a foreign position on an
untraded instrument counts only as equity. 50 lots gets the same
decision as 0.25.

atif — your proposal is the fix. The check now lists every position on
the account and refuses any new entry while one it did not open is
there, on any instrument. Your breakeven replay case has its own test.
The no-stop case you raised falls out of it: with no stop there is
nothing to reserve, so it refuses.
Youness Kanbaou #:
Late to this, but one data point on the "minute bars understate" part.

Testing an equity-based daily lock (100,000 account, 5% limit, lock at 90% of it): with "1 minute OHLC" the day closed at 105% of the limit, with real ticks it locked at 90.0% (−4,501 of −5,000). Same code, same day. On bars the lock simply saw the drop too late.

On atif's point about news gaps arriving together: reserving allowance for them is one answer, being flat is the other. Closing positions a few minutes before high-impact news and before the Friday close removes the scheduled part of that tail, and what is left to budget for is the surprise gaps only. Same idea at the soft limit: close what is open, not just block new entries, since the open risk is what gaps through.

Mohamed, in your 13.84% day, how much of it came from scheduled releases?

Measured: all of that day fell inside windows the system avoids today,

none outside. 85.7% was one CPI release minute, the rest two weekend

gaps.

So your suggestion is already what it does. The 13.84% is the replay

from before those windows existed; with them, the same replay's worst

day is 0.753%. You were right before I was.

And our measurement points the same way as yours: in ordinary minutes

and around releases, ticks show larger jumps than bars, so the

allowance is taken from ticks. Across a weekend close the two agree —

one price step either way.

Mohamed Trading #:

Measured: all of that day fell inside windows the system avoids today,

none outside. 85.7% was one CPI release minute, the rest two weekend

gaps.

So your suggestion is already what it does. The 13.84% is the replay

from before those windows existed; with them, the same replay's worst

day is 0.753%. You were right before I was.

And our measurement points the same way as yours: in ordinary minutes

and around releases, ticks show larger jumps than bars, so the

allowance is taken from ticks. Across a weekend close the two agree —

one price step either way.

Mohamed Trading, thanks for checking that breakdown, that 85.7% on a single CPI minute matches what many would expect.

One execution detail worth testing in your replay is the timing buffer before those windows. On many brokers, spreads widen significantly a few minutes before high-tier releases, and often well before the Friday close. If an account flattens at the very last minute, closing directly into that widened spread takes an avoidable bite out of equity.

There is also the execution latency in MT5. Liquidating several open positions sequentially via CTrade::PositionClose requires individual roundtrips to the server. If liquidity thins just ahead of the release, some brokers may return TRADE_RETCODE_REQUOTE or slip market orders substantially. Giving the exit logic a buffer of a few minutes rather than cutting it to the final seconds usually ensures all tickets clear cleanly.
Mohamed Trading #:
Sayed — the measurement above was for your case; it landed under
atif's post because he had already picked it up. Short version: the
check never lists the whole account, so a foreign position on an
untraded instrument counts only as equity. 50 lots gets the same
decision as 0.25.

atif — your proposal is the fix. The check now lists every position on
the account and refuses any new entry while one it did not open is
there, on any instrument. Your breakeven replay case has its own test.
The no-stop case you raised falls out of it: with no stop there is
nothing to reserve, so it refuses.
Hello Mohamed,

i followed the last posts with interest. One thing about the new rule. It refuses any new entry while a position from another EA is open, on any instrument.

On an account like mine that means only one EA can trade at a time. With three or four EAs on the same account, each one would block the others a lot of the time. For a single EA prop account thats fine, but people who run several EAs together would probably just switch it off.

atif's idea of reserving stop distance plus gap allowance for every foreign position would let them run side by side and still keep the worst day inside the cap. Maybe the hard block only for positions without a stop?

Best regards
Chris
Youness Kanbaou #:
Mohamed Trading, thanks for checking that breakdown, that 85.7% on a single CPI minute matches what many would expect.

One execution detail worth testing in your replay is the timing buffer before those windows. On many brokers, spreads widen significantly a few minutes before high-tier releases, and often well before the Friday close. If an account flattens at the very last minute, closing directly into that widened spread takes an avoidable bite out of equity.

There is also the execution latency in MT5. Liquidating several open positions sequentially via CTrade::PositionClose requires individual roundtrips to the server. If liquidity thins just ahead of the release, some brokers may return TRADE_RETCODE_REQUOTE or slip market orders substantially. Giving the exit logic a buffer of a few minutes rather than cutting it to the final seconds usually ensures all tickets clear cleanly.
Youness,

Both points land on the same thing, and it is open work.

The close lead is five minutes against a sixty-second management cycle,
so it was designed for five attempts. The broker stops quoting one to
four minutes before the close, so it usually gets one to three — and
twice in three years, less than one. That worked by luck.

Your spread point changes what the lead should count. Not attempts, but
attempts at a usable price. And since each PositionClose is its own
roundtrip, the lead has to absorb a retry per ticket, not just one
clean pass.

Being measured now, and I will post it either way: how many runs land
before the last quote, per instrument and per closure type; the lead
that buys three clean attempts and the lead that buys five; and what
each costs in refused entries. I would rather publish the trade cost
than quietly lengthen the wait.

Thanks — this turned a "probably fine" into a number I have to produce.