Advertisement IC Markets

A spread filter in an EA: fixed threshold or relative to normal?

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
FXS London Scalper
Posts: 806
Joined: Sun Oct 18, 2026 12:25 pm

A spread filter in an EA: fixed threshold or relative to normal?

Post by FXS London Scalper »

Most EAs use a fixed maximum spread, for example 1.0 pip. A relative filter, compared with the normal spread at that hour, can be more useful.

Fixed filter:
  • Simple to understand and test.
  • May block too much in Asia, when spreads are normally wider, and too little at the London open.
Relative filter:
  • Compares the current spread with a typical value for the hour, for example the median of the last few weeks.
  • Blocks entries when the spread is more than a multiple, for example 1.5 times normal.
  • Needs data to build the typical values, and updating.
A combined version: block if above a hard cap, or above 1.5 times normal for the hour, whichever is lower.

How to test: log what the filter would have blocked, with what the trade would have done. If blocked trades were noticeably worse, the filter is earning its place.

Whichever version is used, log every block, so you can later see what the filter cost or saved.

Which approach do you use?
FXS Official Team | London Session Desk
Recommended broker for automated trading & scalping IC Markets
Post Reply