Advertisement IC Markets

Limit order entries in an EA instead of market orders, what it did to fills and missed trades

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

Limit order entries in an EA instead of market orders, what it did to fills and missed trades

Post by Fairman »

Limit order entries in an EA instead of market orders, what it did to fills and missed trades

my EA used to enter with market orders when a signal appeared. I looked at the fills and saw a consistent small cost from slippage and spread. So I tried switching to limit orders at the signal level, with an expiry of a few candles.

The effect was clear. Fills were at my price or better, the average cost per trade went down, and there was no slippage on the entry. But I also missed some trades, specifically the ones where price moved away without coming back. I wanted to see how those compared, so I logged the missed signals and what they would have made.

The missed trades were some of the best ones, which makes sense: strong moves don't pull back. But the ones I took with limits were better on average per trade, and the total difference was small. Which approach is better depends on the strategy, and the test showed it was a modest improvement for mine.

I kept the limit entries with a short expiry, and for a special class of signal that is momentum based, I still use market orders. It's a mix, depending on how the edge works.
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Limit order entries in an EA instead of market orders, what it did to fills and missed trades

Post by Fairman »

I ran into the same tradeoff and tried a middle option: a limit order placed slightly beyond the signal level, so it fills on a small pullback instead of needing a full return. It kept most of the cost saving and caught more of the strong moves than a limit right at the level. Not all of them though. I still miss the ones that never pull back at all. I logged both versions on the same signals for a while before deciding, which is the only fair way to compare.
It’s Fairman :geek:
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Limit order entries in an EA instead of market orders, what it did to fills and missed trades

Post by Fairman »

One technical thing to watch is the expiry. Some brokers do not support expiry on pending orders for every symbol or every account type, so the order just sits there. I handle it in the EA instead, by recording when the order was placed and deleting it after a set number of candles. I also cancel any pending order before high impact news and when the session filter closes. Otherwise a stale limit can fill hours later when the setup no longer exists.
It’s Fairman :geek:
Fairman
Posts: 3303
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: Limit order entries in an EA instead of market orders, what it did to fills and missed trades

Post by Fairman »

On the missed trades being the best ones, I think it is worth accepting that as the price of the method rather than trying to fix it. When I tried adding a market order fallback for strong moves, the logic got complicated and the fallback trades had all the slippage I was trying to avoid. In the end I picked limits and accepted fewer trades. The important thing is that the backtest models the missed fills honestly, because a tester that fills every limit will overstate results.
It’s Fairman :geek:
Post Reply