Download MetaTrader 5
To add comments, please log in or register
Install apps from the library right in MetaTrader. It is easy!
CaptainPeacock
10
CaptainPeacock 2013.08.09 16:12 

I just started with mql5 and I am very excited about it.

But I struggle with a (probably) simple problem which I am unable to fix:

When I use the strategy tester the spread is always fixed to 50 when using EURUSD, M1

But when I look at the docs I see: "The Strategy Tester of MetaTrader 5 client terminal uses the historical spread values

(https://www.mql5.com/en/code/152)

Is there a way to setup my strategy tester to use historical spread values?

Forex Strategy Tester in the MetaTrader 5 Trading Platform
  • www.metatrader5.com
Strategy Tester is a powerful tool that allows testing the efficiency of an Expert Advisor (trading robot) and detects the best input parameters before it is used for real trading on the financial markets (Forex, Stocks, Futures and CFD).
Alain Verleyen
Moderator
30206
Alain Verleyen 2013.08.09 16:36  
CaptainPeacock:

I just started with mql5 and I am very excited about it.

But I struggle with a (probably) simple problem which I am unable to fix:

When I use the strategy tester the spread is always fixed to 50 when using EURUSD, M1

But when I look at the docs I see: "The Strategy Tester of MetaTrader 5 client terminal uses the historical spread values

(https://www.mql5.com/en/code/152)

Is there a way to setup my strategy tester to use historical spread values?

Spread is stored with historical data (for each bar) and is use by Strategy Tester.
CaptainPeacock
10
CaptainPeacock 2013.08.09 17:18  
angevoyageur:
Spread is stored with historical data (for each bar) and is use by Strategy Tester.

Thanks Angevoyageur but when I use the strategy tester, the spead does not change (is always 50)?

Simon Gniadkowski
Moderator
17990
Simon Gniadkowski 2013.08.09 17:51  
CaptainPeacock:

Thanks Angevoyageur but when I use the strategy tester, the spead does not change (is always 50)?

Maybe the date from your Broker is not so good,  try the MetaQuotes Demo server or another Broker and different data.
CaptainPeacock
10
CaptainPeacock 2013.08.10 05:03  

Problem solved :)

I had selected a date range in 2003 for the strategie tester.

If I use a more recent date selection, the spread is now changed every tick

(which is a very nice feature btw!).

Thanks for the support 

/
To add comments, please log in or register