OnTick() time

 

Hi all,

I am trying to back test my EA but when I try to get the time of the tick it keeps returning the actual current time


void OnTick()
  {
//---
      WriteLog(IntegerToString(TimeHour(iTime(NULL,PERIOD_M5,0)))+" "+IntegerToString(TimeMinute(Time[0])));


I have tried but Time[] and iTime[]


Any help anyone?


Steve

 

Why don't you use TimeCurrent() (From the reference of the editor: mouse above the function  + F1):

During testing in the Strategy Tester, TimeCurrent() is simulated according to historical data.

Beside that instead of IntegerToString() you can write as well : (string)TimeHour(..)

 

Hi Carl,

TimeCurrent is the Current time isn't it? I want the time the tick occurred so I can use the backtesting.


Steve

 
scarr:

Hi Carl,

TimeCurrent is the Current time isn't it? I want the time the tick occurred so I can use the backtesting.


Steve


If you only bother to follow the link Carl has published...
 

Hi Ex Ovo,


I did but misread it :-(  Thanks :-)


Steve

Reason: