time working - page 2

 
error disappeared but problem doesnt solve . with hour() COMMAND it's possible to work only in specific period but my problem is on the tester strategy. if i test the EA, it includes all periods . understand?? i dont want to considerate for example from 5 am to 9 am. otherwise i have to export and analize in excel but it's very long
 
ok ok it works but not in tester strategy :-(((((((
 
giulioron wrote >>
ok ok it works but not in tester strategy :-(((((((

what time frame

 
i use 15 minutes but the problem appears for all periods i have tried to export in excel but it's really hard
 
giulioron:
ok ok it works but not in tester strategy :-(((((((

I think time related functions do not work in the strategy tester.

So you have to do forward tests only.

 

Time Related functions DO work in the strategy tester. I use a strategy with timeframes for my EA and I have no problems.

I define some variables inside my EA

datetime TimeFrame.Start, TimeFrame.End;

TimeFrame.Start = StrToTime("08:45:00");

TimeFrame.End = StrToTime("09:00:00");

And later I check, if I am inside this timeframe to apply my strategy:

if (TimeFrame.Start<=TimeCurrent() && TimeCurrent()<TimeFrame.End)
  {
   Strategy ...
  }

Try it ...

TuRRiCAN

Reason: