backtesting with pending STOP Orders

 

Hello,

I have noticed when I backtest a strategy using OP_BUYSTOP or OP_SELLSTOP  types, execution levels are done at the exact STOP level even when such market execution would'nt have been possible ( gaps...) 

Normally if you backtest with OP_BUY and OP_SELL  and have a proper set of reliable tickdata your execution will be at the exact tick price reflecting the gap

 Has anyone noticed that and is there a way to overcome ?

 

Thanks

 
marsupilami:

Hello,

I have noticed when I backtest a strategy using OP_BUYSTOP or OP_SELLSTOP  types, execution levels are done at the exact STOP level even when such market execution would'nt have been possible ( gaps...) 

Normally if you backtest with OP_BUY and OP_SELL  and have a proper set of reliable tickdata your execution will be at the exact tick price reflecting the gap

 Has anyone noticed that and is there a way to overcome ?

 

Thanks

a backtest does no ask line (live spread) and no gap. trades are open or closed within gaps!
 
Bernhard Schweigert:
a backtest does no ask line (live spread) and no gap. trades are open or closed within gaps!
Hi I use tickdata of my own broker (gathered through an ea with bid and ask) to create own .FXT file with live spreads (using TDS)
 
marsupilami:
Hi I use tickdata of my own broker (gathered through an ea with bid and ask) to create own .FXT file with live spreads (using TDS)
Which is your broker???. I only know tick data from Dukascopy, Integral / Pepperstone, Gain Capital, MB Trading, Hisdata (free data source), and Oanda (only for real account clients), and I would like to know if there is another source else. Thanks.
 
Jose Francisco Casado Fernandez:
Which is your broker???. I only know tick data from Dukascopy, Integral / Pepperstone, Gain Capital, MB Trading, Hisdata (free data source), and Oanda (only for real account clients), and I would like to know if there is another source else. Thanks.

actually my broker doesn't provide tick data. I run a few expert advisors live on a real account and different pairs since years just to to log all tics (bid and ask) and then I use these csv files to create the .FXT.  I prefer this to Dukascopy just because they fit better to what I can expect from my broker's quote. You could do it with any broker but it'll take time before you get sufficient data logged to optimize.

 
marsupilami:

actually my broker doesn't provide tick data. I run a few expert advisors live on a real account and different pairs since years just to to log all tics (bid and ask) and then I use these csv files to create the .FXT.  I prefer this to Dukascopy just because they fit better to what I can expect from my broker's quote. You could do it with any broker but it'll take time before you get sufficient data logged to optimize.

Ok, I have a friend that did the same way. Unfortunately there is no EA that save all the ticks. MT5 now saves ticks history. No need to PC or VPS working 24 hours. It's much more comfortable. Thanks.
Reason: