Wrong fill price with Market Orders?

I did some backtesting today and noticed that with Market Orders I get fill prices that often times can't possibly be right because there are differences of 3, 4 or even more pips from the open price of the candle where it is supposed to be near at.

So, with this

ticket = MarketOrder(symbol, 1000);

Debug("Fill Price: " + ticket.AverageFillPrice);

I get fill prices way too far away from where they should be. I mean, I am working with EURUSD, the most liquid forex pair out there with only a micro lot, there shouldn't any notable slippage or whatever.

What is going on here? Is this due to QuantConnect modelling in fees and slippage? But even then, this is often too much.

Update Backtest

Maybe I should say that I am working with 3 minute consolidated bars. Does this have to do something with the phenomenon I described above? At what time is a market order actually placed? At the opening of the candle?


Update Backtest


The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


This discussion is closed