Measuring how often an EA's signal and its fill land on different bars
Posted: Wed Oct 28, 2026 11:50 am
An EA that checks signals on bar close and sends immediately is usually assumed to fill in the first second of the new bar. Logging it is the only way to be sure, and it's worth doing.
What to log per trade:
Then compare the average result of late fills with the rest. If they're clearly worse, the reason is easy to see: the first seconds after a signal often carry the best price, and later the move is partly gone.
A fix: have the EA check time since the bar opened and skip the trade if more than a few seconds have passed, say 5. Log the delay on every trade so you can tune the threshold.
In MQL5, TimeCurrent() against iTime(_Symbol,_Period,0) gives the delay in seconds; GetTickCount64() gives millisecond resolution for send-to-fill.
Does anyone else measure signal-to-fill delay?
What to log per trade:
- Bar open time of the signal bar and the following bar.
- Time the order was sent and the time the fill confirmed, in milliseconds.
- Whether the terminal had just reconnected or was loading history.
Then compare the average result of late fills with the rest. If they're clearly worse, the reason is easy to see: the first seconds after a signal often carry the best price, and later the move is partly gone.
A fix: have the EA check time since the bar opened and skip the trade if more than a few seconds have passed, say 5. Log the delay on every trade so you can tune the threshold.
In MQL5, TimeCurrent() against iTime(_Symbol,_Period,0) gives the delay in seconds; GetTickCount64() gives millisecond resolution for send-to-fill.
Does anyone else measure signal-to-fill delay?