Help with Ichi Alert Indicator

Back to topics list  | 1 2 3 To post a new topic, please log in or register
avatar
Moderator
3419
GumRai 2015.05.07 00:32 #
 
read1985:
Any ideas? :)

Well, it seems that TimeCurrent() is not updated quickly enough

Could this be a workaround?

   if(IsConnected()==false)
     {
      return(0);
     }
   static bool first_ticks=true;
   static datetime TC=TimeCurrent();
   if(first_ticks)
      if(TC==TimeCurrent())
         return(0);
   first_ticks=false;
   if(TimeDayOfYear(TimeCurrent())!=TimeDayOfYear(iTime(Symbol(),PERIOD_D1,0)))
      return(0);

 It should mean that when you start the terminal it will wait for the time to update. If this doen;t work, then I don't expect to have any further suggestions.

avatar
30
read1985 2015.05.07 05:00 #
 
Thanks GumRai, will test it out!
avatar
30
read1985 2015.05.08 05:14 #
 

Ok so it didn't give any of the previous days results which is good! But I can't test conclusively as there we no alerts produced today. But id does seem to be working, I will know for sure on Tuesday!

 

Thanks GumRai! 

avatar
30
read1985 2015.05.13 05:35 #
 
Seems to be working 100% now, thanks GumRai! :)
avatar
30
read1985 2015.05.14 06:02 #
 

No I lie!

 

It now doesn't show the previous days alerts as well as today's alerts, but I need to open the client twice to get all of todays alerts.

So the first time I open the client, I will get 1 alert. Then when I close and open it again, I get the original correct alert plus the rest of the alerts for the day.

 

Weird?

 

Richard 

Back to topics list   | 1 2 3  

To add comments, please log in or register