Can anyone figure out why this will not work right??
if (UseHourTrade)
{
if(!(Hour()>=FromHourTrade1 && Hour()<=ToHourTrade1)) a=1;
if(!(Hour()>=FromHourTrade2 && Hour()<=ToHourTrade2)) b=1;
if(!(Hour()>=FromHourTrade3 && Hour()<=ToHourTrade3)) c=1;
if(a==1 || b==1 || c==1)
{
Comment(
"\n"," * SOLAR WIND EXPERT ADVISOR *",
"\n",
"\n", " - PROGRAM IN SLEEP CYCLE - ",
"\n",
"\n"," > NON-TRADING HOURS! <");
return(0);
}
}
It compiles ok, but even if the program is active during one of the sessions, it displays the PROGRAM IN SLEEP message. I do not know what to do to correct this??
|