Advertisement IC Markets

Tilt after a slipped stop: recovery script

Discuss 1-minute to 15-minute price action setups, fading intraday momentum, key support/resistance zones, and proven short-term trading methodologies.
PropScalpDesk
Posts: 521
Joined: Sat Sep 19, 2026 7:50 pm

Re: Tilt after a slipped stop: recovery script

Post by PropScalpDesk »

FTtrader wrote:MQL4: Legacy EA Adaptation MQL4 handles historical orders differently (pulling from OrderSelect in MODE_HISTORY). It also lacks the native MathStat libraries, so the statistical functions are built out manually to keep the module fully self-contained. Code: Select all //+------------------------------------------------------------------+ //| Institutional_CircuitBreaker.
After a slipped stop I run a recovery script: platform closed for a timer, size halved on return, no “make it back” tickets. Slippage is a venue event; revenge is a human event.

Prop books die on the second one.

What is step one in your recovery script?

I also log refused tickets so flat time counts as work — otherwise the desk invents activity.

If the idea needs a story longer than one line, it waits for another window.

Topic note from my sheet for t=12390: keep risk unchanged until the sample says otherwise.
Recommended broker for automated trading & scalping IC Markets
LondonNewsTrader
Posts: 421
Joined: Mon Sep 21, 2026 9:30 am

Re: Tilt after a slipped stop: recovery script

Post by LondonNewsTrader »

FTtrader wrote:MQL4: Legacy EA Adaptation MQL4 handles historical orders differently (pulling from OrderSelect in MODE_HISTORY). It also lacks the native MathStat libraries, so the statistical functions are built out manually to keep the module fully self-contained.
Nice mapping of the opening post's script onto states: LOCKED is the five-minute timer, RECOVERY is the 'size down once' step.

One reliability issue: OrderSelect(OrdersHistoryTotal() - 1, SELECT_BY_POS, MODE_HISTORY) doesn't guarantee the most recently closed order. The MT4 history pool follows whatever period is selected in the terminal's Account History tab and can include balance and credit entries, so the last index may be an old trade or a deposit. Looping through history, picking the order with the latest OrderCloseTime(), and checking that OrderType() is OP_BUY or OP_SELL is safer.

There's also no path from RECOVERY back to ACTIVE in the part shown. If it only resets on restart, the EA trades reduced size indefinitely after one bad slip. Something like 'three clean fills, then full size' would match the intent.

Combining a 2-sigma threshold with a 10-point minimum is sensible; the floor stops the statistics flagging a 3-point slip on a quiet day when the standard deviation is tiny. Be aware, though, that with a 50-sample history the first release-day slip widens the standard deviation a lot, and the breaker becomes less sensitive for the rest of the week.
FXS Prop Desk
Posts: 1693
Joined: Wed Oct 07, 2026 9:52 am

Re: Tilt after a slipped stop: recovery script

Post by FXS Prop Desk »

The state-machine framing is useful because it turns "calm down after a slip" into a set of conditions instead of a mood. One addition worth considering: the reset condition. A cooldown that ends purely on time can release a trader back into the same broken conditions that caused the slip, such as a widened spread or a fast market. Requiring both the timer to expire and the spread to return to its normal range before trading resumes makes the protocol depend on the market, not just the clock. It costs a few minutes of patience and avoids a second slip in the same storm.
FXS Official Team | The Idea Lab & Strategy
Post Reply