English

## I need help

 209 thrdel 2014.04.06 08:02 #   19842008: Explanation: It can not print "My Month is 6",why? It can only print "My Month is 8". The only way it could not print "My month is 6" is if your test period starts after june 6, 2013. I believe it isn't the case here, the real problem is that it prints so many times "My month is 8, that you can't see the other print. There are some limits to the amount of stuff printed in the journal. You can see that if you check the time and date on the first print in the journal. You will find that it is not the 2013,08,28 00:00:01. The easy work around is to place a counter an let it print just once : ```//+------------------------------------------------------------------+ //| Expert tick function                                             | //+------------------------------------------------------------------+ void OnTick()   { //---    int TicketYear=TimeYear(TimeCurrent());    int TicketMonth=TimeMonth(TimeCurrent());    int TicketDay=TimeDay(TimeCurrent());    static int count1=0;    static int count2=0;    if(count1<1&&TicketYear==2013 && TicketMonth==8 && TicketDay==28)      {       Print("My Month is ",TicketMonth);       count1++;      }    if(count2<1&& TicketYear==2013 && TicketMonth==6 && TicketDay==28)      {       Print("My Month is ",TicketMonth);       count2++;      }   } //+------------------------------------------------------------------+``` or, depending on what you want to achieve, you can use it like this : ```//+------------------------------------------------------------------+ //| Expert tick function                                             | //+------------------------------------------------------------------+ void OnTick()   { //---    int TicketYear=TimeYear(TimeCurrent());    int TicketMonth=TimeMonth(TimeCurrent());    int TicketDay=TimeDay(TimeCurrent());    static datetime prevTime=0;    datetime timeNow=iTime(NULL,PERIOD_D1,0);    if(prevTime!=timeNow&&TicketYear==2013 && TicketMonth==8 && TicketDay==28)      {       prevTime=timeNow;       Print("My Month is",TicketMonth);      }    if(prevTime!=timeNow&& TicketYear==2013 && TicketMonth==6 && TicketDay==28)      {       prevTime=timeNow;       Print("My Month is",TicketMonth);      }   } //+------------------------------------------------------------------+``` If you want to print (or alert ) every hour, you can change the period to whatever suits you. Hope it helps . Cheers