Download MetaTrader 5

Please help: Spread

To add comments, please log in or register
Sign up to publish an article and receive 200 USD
fractalfreak
1674
fractalfreak 2016.07.20 14:54 

Hello,


I downloaded and imported the 1-minute data from FXDD and use it for my backtests.


I realized that no matter what I define for "spread" on the strategy tester, results are the same.


So I wonder whether all backtest results will be flawed and why exactly (fixed spread from the data?), so even I imported and use 1-minute tick data, this is not representative at all?


thx so much

fractalfreak
1674
fractalfreak 2016.07.20 14:56  

Note:


I checked all trades visually via the respective option, the 1-minute candles look realistic and correct, the signals work correctly and the EA trades as it is supposed to be.

Marco vd Heijden
Moderator
4685
Marco vd Heijden 2016.07.20 14:58  
fractalfreak:

Note:


I checked all trades visually via the respective option, the 1-minute candles look realistic and correct, the signals work correctly and the EA trades as it is supposed to be.

Of course it will never be representative.

It's just good to see if the logic fires appropriately.

Volli
21
Volli 2016.07.20 15:11  
fractalfreak:

Hello,


I downloaded and imported the 1-minute data from FXDD and use it for my backtests.


I realized that no matter what I define for "spread" on the strategy tester, results are the same.


So I wonder whether all backtest results will be flawed and why exactly (fixed spread from the data?), so even I imported and use 1-minute tick data, this is not representative at all?


thx so much

If EA works on first tick of bar than representative.
fractalfreak
1674
fractalfreak 2016.07.20 15:33  

ok so.......


the imported price data is displayed correctly...................so let us also say that this is the "real price"........now.........the indis of the EA and the EA strategy itself work correctly...........


my clear question:


1. since the imported data has a fixed spread, changing the spread as an input to the strategy tester does not change anything, right?


2. what would be the spread?


3. does the strategy calculate all profits / losses based on one spread? if yes, which one?

So if I have a fixed stop of 5.5p, and I trade 1m per trade, the loss shown is USD 550..........so seems to be right.....


Thx for helping with precise info.

Marco vd Heijden
Moderator
4685
Marco vd Heijden 2016.07.20 15:41  
fractalfreak:

ok so.......


the imported price data is displayed correctly...................so let us also say that this is the "real price"........now.........the indis of the EA and the EA strategy itself work correctly...........


my clear question:


1. since the imported data has a fixed spread, changing the spread as an input to the strategy tester does not change anything, right?


2. what would be the spread?


3. does the strategy calculate all profits / losses based on one spread? if yes, which one?

So if I have a fixed stop of 5.5p, and I trade 1m per trade, the loss shown is USD 550..........so seems to be right.....


Thx for helping with precise info.

Only if you use bar open prices mode and you can simply Comment() the spread to check it's value while it's running.
fractalfreak
1674
fractalfreak 2016.07.20 15:49  

the entry signals are intrabar.....


so I guess I cannot check it?

Marco vd Heijden
Moderator
4685
Marco vd Heijden 2016.07.20 15:52  
fractalfreak:

the entry signals are intrabar.....


so I guess I cannot check it?

Did you import every tick or just ohlc price data ?

If the latter then the bars are filled by the tick generating algorithm.

Please read: https://www.mql5.com/en/articles/75

The Algorithm of Ticks' Generation within the Strategy Tester of the MetaTrader 5 Terminal
The Algorithm of Ticks' Generation within the Strategy Tester of the MetaTrader 5 Terminal
  • 2010.06.02
  • MetaQuotes Software Corp.
  • www.mql5.com
MetaTrader 5 allows us to simulate automatic trading, within an embedded strategy tester, by using Expert Advisors and the MQL5 language. This type of simulation is called testing of Expert Advisors, and can be implemented using multithreaded optimization, as well as simultaneously on a number of instruments. In order to provide a thorough testing, a generation of ticks based on the available minute history, needs to be performed. This article provides a detailed description of the algorithm, by which the ticks are generated for the historical testing in the MetaTrader 5 client terminal.
fractalfreak
1674
fractalfreak 2016.07.20 16:27  

Thx Marco...


I guess it is the latter when it comes from FXDD right?

Marco vd Heijden
Moderator
4685
Marco vd Heijden 2016.07.20 16:36  
fractalfreak:

Thx Marco...


I guess it is the latter when it comes from FXDD right?

I guess so.

Why not run it on a demo account to see what it does?

It's not as fast but the results will certainly be more reliable.

By the way you can do a few quick scans over all available bars in history in the OnInit() function to calculate best parameters.

It makes your robot adaptive, and it is a lot quicker then the endless hours of backtesting a specific group of people do because they are in believe that the result have some relationship to the results gained on real market (tick) feeds.

fractalfreak
1674
fractalfreak 2016.07.20 16:41  
Marco vd Heijden:

I guess so.

Why not run it on a demo account to see what it does?

It's not as fast but the results will certainly be more reliable.

By the way you can do a few quick scans over all available bars in history in the OnInit() function to calculate best parameters.

It makes your robot adaptive, and it is a lot quicker then the endless hours of backtesting a specific group of people do because they are in believe that the result have some relationship to the results gained on real market (tick) feeds.

Thx Marco...


what do you mean with "By the way you can do a few quick scans over all available bars in history in the OnInit() function to calculate best parameters."?


Thx for explaining...

12
To add comments, please log in or register