Tester giving identical results even with a factor of 10 difference in spread Why?

 

In my quest to assess the sensitivity of spread values during testing I can't quite get my head around what it is doing.


I created two custom symbols based on AUDCHF specification. I download bar data from tickstory and I modified the spread values in each file to 24 and 200, respectively. For each file I clicked the bar tab and imported M1 data, selecting the correct file for each symbol. The data appeared to import correctly see the screenshots below. I initially selected "Open Prices only" as the modelling method in strategy tester and ran the EA backtest for both custom symbols. The results were exactly the same. I repeated this for th 1 minute OHLC modelling and the two files with a factor of 10 difference in spread gave the same results. The question is Why? It doesn't seem right to me. Can anyone help?



 
EdFuk:

In my quest to assess the sensitivity of spread values during testing I can't quite get my head around what it is doing.


I created two custom symbols based on AUDCHF specification. I download bar data from tickstory and I modified the spread values in each file to 24 and 200, respectively. For each file I clicked the bar tab and imported M1 data, selecting the correct file for each symbol. The data appeared to import correctly see the screenshots below. I initially selected "Open Prices only" as the modelling method in strategy tester and ran the EA backtest for both custom symbols. The results were exactly the same. I repeated this for th 1 minute OHLC modelling and the two files with a factor of 10 difference in spread gave the same results. The question is Why? It doesn't seem right to me. Can anyone help?



Please post the tester Journal log including both tests.
 
Alain Verleyen #:
Please post the tester Journal log including both tests.

The logs are pretty big (~110Mb). What's the best way of posting what you need?

 
EdFuk #:

The logs are pretty big (~110Mb). What's the best way of posting what you need?

The tester information are needed only. Not anything from your specific EA.

To avoid the trouble to cut the log in chunks, you could download the file in the cloud somewhere (Google drive or something similar) and give me the link. I will check.

 
EdFuk:

In my quest to assess the sensitivity of spread values during testing I can't quite get my head around what it is doing.


I created two custom symbols based on AUDCHF specification. I download bar data from tickstory and I modified the spread values in each file to 24 and 200, respectively. For each file I clicked the bar tab and imported M1 data, selecting the correct file for each symbol. The data appeared to import correctly see the screenshots below. I initially selected "Open Prices only" as the modelling method in strategy tester and ran the EA backtest for both custom symbols. The results were exactly the same. I repeated this for th 1 minute OHLC modelling and the two files with a factor of 10 difference in spread gave the same results. The question is Why? It doesn't seem right to me. Can anyone help?



won't the tester alter the spread to the value chosen manually ? (unless real ticks are used) ?

 
Lorentzos Roussos #:

won't the tester alter the spread to the value chosen manually ? (unless real ticks are used) ?

What value chosen manually ?

It's custom symbol, build from minutes data and test on Open Prices or 1 minute OHLC.

 
Alain Verleyen #:

The tester information are needed only. Not anything from your specific EA.

To avoid the trouble to cut the log in chunks, you could download the file in the cloud somewhere (Google drive or something similar) and give me the link. I will check.

Sent you a link to the log files.


Many thanks

 

I tried to replicate it but i could not add bars to custom symbols via the manual method .

with the script method though the 200 spread is 200 and the 20 spread is 20 

(i used the below to create 2 fakesymbols one with 200 one with 20)

#property version   "1.00"
input string name="FAKESYMBOL";//name to save
input int manualSpread=200;//spread (-1 to use existing)
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
  if(_Period==PERIOD_M1){
  EventSetMillisecondTimer(44); 
  }else{
  ChartSetSymbolPeriod(ChartID(),_Symbol,PERIOD_M1);
  }
//---
   return(INIT_SUCCEEDED);
  }
void OnTimer(){
  EventKillTimer();
  bool loading=true;
  int load=0;
  while(loading)
       {
       Sleep(44);
       load=Bars(_Symbol,PERIOD_M1);
       if(load>10000){loading=false;}
       }
  //collect the rates 
    MqlRates rates[];
    load=10000;
    int copied=CopyRates(_Symbol,PERIOD_M1,0,load,rates);
    if(copied>0){
    Print("Copied "+IntegerToString(copied));
    Print("rate[0] "+TimeToString(rates[0].time,TIME_DATE|TIME_MINUTES|TIME_SECONDS));
    Print("rate[last] "+TimeToString(rates[copied-1].time,TIME_DATE|TIME_MINUTES|TIME_SECONDS));
    if(CustomSymbolCreate(name,NULL,_Symbol)){
     if(manualSpread>-1){
    for(int i=0;i<copied;i++){    
         rates[i].spread=manualSpread;
       }    
    }
    datetime from=rates[0].time;
    datetime to=rates[copied-1].time;
    int ratesadded=CustomRatesReplace(name,from,to,rates,copied);
    Print("rates added "+IntegerToString(ratesadded));
    }else{Print("Cannot create custom symbol");}
    }else{
    Print("Cannot copy rates");
    }
    Print("DONE");
    ExpertRemove();
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   
  }
//+------------------------------------------------------------------+
 
Lorentzos Roussos #:

I tried to replicate it but i could not add bars to custom symbols via the manual method .

with the script method though the 200 spread is 200 and the 20 spread is 20 

(i used the below to create 2 fakesymbols one with 200 one with 20)

Yes but is it giving for a backtest using Open prices or 1 Minute OHLC ?
 
Alain Verleyen #:
Yes but is it giving for a backtest using Open prices or 1 Minute OHLC ?

Both tests use the spread specified in the rates yeah

I would suggest the op did a test with new symbol names as he may be stepping on another symbol possibly (i.e. new bars did not import or smth)
 
Lorentzos Roussos #:

Both tests use the spread specified in the rates yeah

I would suggest the op did a test with new symbol names as he may be stepping on another symbol possibly (i.e. new bars did not import or smth)
Thanks for looking into it. It’s very strange. I’m planning to spend a bit of time on it tomorrow. 

Before going down the custom symbol route I tried to change the spread field in the symbol to an integer. That didn’t seem to work but should it?
Reason: