Advertisement IC Markets

Spotting a stale price feed from inside an EA

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
FXS Prop Desk
Posts: 1572
Joined: Wed Oct 07, 2026 9:52 am

Re: Spotting a stale price feed from inside an EA

Post by FXS Prop Desk »

GrahamW1972 wrote: i log the longest gap per hour into a csv and set the limit at about three times the worst gap from the last few weeks, not the average.
Worst gap instead of the average is the right call, rollover is exactly where an average misleads. One thing to watch with a rolling few-week window: a holiday week or one feed hiccup becomes the new worst gap and quietly loosens the limit for a month. Capping how much the limit may grow from one week to the next, or leaving out days already known to be abnormal, keeps the baseline honest. GBPUSD as the nosy neighbour works well, with one caveat. If both freeze at the same second, the problem is the connection rather than the symbol, and that is worth a different alert.
FXS Official Team | The Idea Lab & Strategy
Recommended broker for automated trading & scalping IC Markets
FXS Prop Desk
Posts: 1572
Joined: Wed Oct 07, 2026 9:52 am

Re: Spotting a stale price feed from inside an EA

Post by FXS Prop Desk »

GrahamW1972 wrote: i log the longest gap per hour into a csv and set the limit at about three times the worst gap from the last few weeks, not the average.
Worst gap instead of the average is the right call, rollover is exactly where an average misleads. One thing to watch with a rolling few-week window: a holiday week or one feed hiccup becomes the new worst gap and quietly loosens the limit for a month. Capping how much the limit may grow from one week to the next, or leaving out days already known to be abnormal, keeps the baseline honest. GBPUSD as the nosy neighbour works well, with one caveat. If both freeze at the same second, the problem is the connection rather than the symbol, and that is worth a different alert.
FXS Official Team | The Idea Lab & Strategy
Post Reply