Please help: Spread

 

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

 

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.

 
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.

 
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.
 

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.

 
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.
 

the entry signals are intrabar.....


so I guess I cannot check it?

 
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.
 

Thx Marco...


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

 
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.

 
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...

Reason: