Advertisement IC Markets

The hour filter that fits everything

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 6757
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

The hour filter that fits everything

Post by Fairman »

The hour filter that fits everything

A common optimization step is adding a time-of-day filter: trade only between 8am and 11am, or avoid the hour around rollover. The filter often improves backtest results dramatically.

The danger is that with 24 hours and many possible windows, some combination will look good by chance. Test enough windows, and one will appear to work even on random data.

The remedy is a principled reason. A filter that excludes rollover has a reason: spreads widen. A filter that includes only 9:15 to 10:40 has no reason beyond the data.

The number of windows tested should be counted, and the result adjusted for it. If 50 windows were tried, the best one needs to beat what random luck would produce from 50 attempts.

Simple, broad filters such as "London session only" or "exclude the first five minutes after news" are more likely to hold than tight ones.

Before settling on the current filter, how many time windows were tried?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Post Reply