Limit orders ignoring orders queue in backtest

 

Hi everyone!


I've been noticing something in my backtests.

The problem is that, in real market, when the price (Candle High) touches a Sell Limit price, the order is not executed instantly, as the order is in the Book and so there's a Queue.

But, in the backtest (using "every tick" modeling), if the price touches the Sell Limit price, the order gets executed instantly, ignoring the orders queue existence.


Is there anyway I can fix this or at least make it more realistic?

 
For testing a strategy it is of no importance. In real market when volume is exhausted you are subject to no fill or partial fill. It is possible to simulate the latter with code.
 
Enrique Dangeroux #:
For testing a strategy it is of no importance. In real market when volume is exhausted you are subject to no fill or partial fill. It is possible to simulate the latter with code.

Yes, the problem is that: sell limits are always getting filled.

Even in with "Every Tick" modeling, sometimes the price only touches the Sell Limit price and MT5 is always filling the order in backtest.

It completly ignores the Orders Queue..

 

Yes, you already stated the "problem". I stated there is no problem.

In tester you always get filled, in real life not. So you make less in real life. The question you want answered is, is the strategy profitable. that is all that matters.

 
Enrique Dangeroux #:
For testing a strategy it is of no importance. In real market when volume is exhausted you are subject to no fill or partial fill. It is possible to simulate the latter with code.

Enrique,

Do you simulate the no fill or partial fill in your EA when running the tester?

Would you randomly not issue a limit order where you usually would?
Or something different?

 
ramesoj #:

Enrique,

Do you simulate the no fill or partial fill in your EA when running the tester?

Would you randomly not issue a limit order where you usually would?
Or something different?

Randomize the volume from 0 to the requested volume would do it.  

I don't because it is not relevant. To evaluyate a strategy it is points (ticks) profit that matter not money. Volume distorts money, not points.