Page 1 of 1

No 'spread' in backtest

Posted: Sat Sep 13, 2014 2:30 pm
by leonidasfx
Hi,

I'm trying out a strategy in XAUUSD using Thinkforex-Live2 server. I have downloaded all the data as per instruction.

But when I turn on the 'Show Ask Line' in the strategy tester, there's no line so I assume there's no spread since the 'buy' and 'sell' order open at same default 'bid' price.

Before I export the data to my MT4, I've opened the Metatrader Info tab and look at the symbol propertues and its written there 20 (2pips) for that instrument.

So, what else should I do? I have tried the normal strategy tester before using the tickdata and I can see the 'Ask' line which shows the price differences in spread.

Please help.

Re: No 'spread' in backtest

Posted: Mon Sep 15, 2014 10:43 am
by tickstory
Hi Leonidasfx,

Try inserting this code into the 'OnTick' method of a blank EA and see what value pops out:

Code: Select all

Print("Spread is: " + DoubleToStr(MarketInfo(Symbol(),MODE_SPREAD), 2));
This is the spread value that is embedded into your export and being used in the strategy tester during your back-test.

Regards.