Pending orders filled with very large slippage in backtesting

Created at 18 Jun 2016, 11:29
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
ZE

zelenij.krokodil

Joined 05.06.2016

Pending orders filled with very large slippage in backtesting
18 Jun 2016, 11:29


Hi everyone,

I am testing an algo, which places a number of pending stop orders.  I then use order label to match it to opened positions to know when an order is filled.  I noticed that in backtesting I occasionally get very large slippage for the orders - almost 10pips!  This is extremely strange and makes the whole platform quite unusable.  I have tried cleaning the backtesting cache as you suggested in one of the forum posts.  Any further idea?  Here is an example - testing against GBPUSD for the period 09/05/2016 - 16/05/2016, my original pending order was this:

ID=283; label=Order328; Sell/Stop 10,000@1.44484; TP=1.44084/40pips, SL=1.44784/30pips

Find the position using Positions.Find(order.Label, Symbol, order.TradeType)

Open position: ID=284; label=Order328; Sell 10,000@1.44385; TP=1.44084, SL=1.44784

By the time this happens I have already placed a few hundreds of orders at different levels, possibly close to 1.44385 as well, but with different labels.  Could it be that your internal cache mixes up orders/positions?  I am quite sure my labels are unique.

Thanks!


@zelenij.krokodil