Strategy Tester, Model=Every Tick - Random Interpolation?

To add comments, please log in or register
twingo99
6
twingo99  

Given:

a) disconnected from server, historical data only

b) 1M bars used to create all other timeframes using period converter

c) Model=Every Tick, Period=Daily, Sym=GBPUSD

d) UseDate=checked, From 2016.02.12 - 2016.02.15

I ran into some quirky behavior on my EA and started to drill down into the details. Running a simple EA:

#property strict
int OnInit()
  {
   i=0;
   Print( "OnInit i=",i,TimeToStr(TimeCurrent(),TIME_DATE||TIME_SECONDS));
   return(INIT_SUCCEEDED);
  }
void OnTick()
  {
   i++;
   Print( "OnTick()  i=",i," " ,TimeToStr(TimeCurrent(),TIME_DATE||TIME_SECONDS));
  }

I'd expect to get similar output in the Journal window of the strategy tester. Starting with i=1 and so forth. However, this is not the case.

For IDENTICAL input parameters, simply re-running this simple test EA gives wildly different starting points. Results copied from bottom of journal window in strategy tester:

Run1:

..

2019.03.15 10:14:59.450    2016.02.12 04:37:18  OrdExecTest GBPUSD,Daily: OnTick()  i=8062 2016.02.12
2019.03.15 10:14:59.450    2016.02.12 04:37:17  OrdExecTest GBPUSD,Daily: OnTick()  i=8061 2016.02.12
2019.03.15 10:14:59.450    2016.02.12 04:37:16  OrdExecTest GBPUSD,Daily: OnTick()  i=8060 2016.02.12

Run2:

..

2019.03.15 10:23:14.051    2016.02.12 22:57:21  OrdExecTest GBPUSD,Daily: OnTick()  i=56062 2016.02.12
2019.03.15 10:23:14.051    2016.02.12 22:57:20  OrdExecTest GBPUSD,Daily: OnTick()  i=56061 2016.02.12
2019.03.15 10:23:14.051    2016.02.12 22:57:20  OrdExecTest GBPUSD,Daily: OnTick()  i=56060 2016.02.12

That implies the tick interpolations are random rather than fixed on some template though there's no mention of 'random' in https://www.mql5.com/en/articles/1511

which talks about predefined templates. Does anyone know of a link where the interpolation algorithm is defined clearly?

thank you

Strategy Tester: Modes of Modeling during Testing
Strategy Tester: Modes of Modeling during Testing
  • www.mql5.com
Many programs of technical analysis allow to test trading strategies on history data. In the most cases, the testing is conducted on already completed data without any attempts to model the trends within a price bar. It can be made quickly, but not precisely enough. It is important to choose a relevant way of modeling price bars to make a...
To add comments, please log in or register