Strategy tester spread hell

 

Hi guys,

I'm having real trouble with the strategy tester - as far as I can tell it only takes the spread value at the beginning of testing and just uses that throughout. So if the spread is varying from the broker between 1-2 pips constantly (as it seems to be doing for me with oanda) my test results are totally different each time. So much so that I can't actually use it at all. One time I'll make a huge and consistent profit, the next run will be absolute loss.

How do you guys deal with this? 

Cheers, Paul. 

 
monsterer:

Hi guys,

I'm having real trouble with the strategy tester - as far as I can tell it only takes the spread value at the beginning of testing and just uses that throughout. So if the spread is varying from the broker between 1-2 pips constantly (as it seems to be doing for me with oanda) my test results are totally different each time. So much so that I can't actually use it at all. One time I'll make a huge and consistent profit, the next run will be absolute loss.

How do you guys deal with this? 

I disconnect from my Broker so the Spread doesn't change.  https://www.mql5.com/en/forum/134956
 
monsterer:

Hi guys,

I'm having real trouble with the strategy tester - as far as I can tell it only takes the spread value at the beginning of testing and just uses that throughout. So if the spread is varying from the broker between 1-2 pips constantly (as it seems to be doing for me with oanda) my test results are totally different each time. So much so that I can't actually use it at all. One time I'll make a huge and consistent profit, the next run will be absolute loss.

How do you guys deal with this? 

Cheers, Paul. 


In a live trading scenario, the spread will vary all the time, so your EA/strategy will have to deal with that fact. I would suggest that if the change in spread is enough to kill your profitability then you will have to rethink things.

Regards, Paul.

 
edit: I was going to add, can you suggest a more intelligent way that an EA might adapt to a changing spread?
 
monsterer:
edit: I was going to add, can you suggest a more intelligent way that an EA might adapt to a changing spread?


Only to take it into account when you place trades. i.e. if you have a tight stop of a few pips then maybe you should consider:

make the stop a few pips plus the current spread

or don't place trades when the spread exceeds a certain value

or change the strategy to work with a wider stop in the first instance

Be aware also that trades left on over the weekend will regularly suffer from very wide spreads (around market close & re-open) which will inevitably wipe out anything with too close a stop. This can run into tens of pips on some pairs.

Just my experience with live trading, it's a much harsher environment than in the tester where lots of EAs look profitable only to get toasted on a live a/c...

Regards, Paul.

 
Thanks for the advice :)