Need help with alert notification

 

anybody can help how to make alert show only once, my alert always show every second

here my code :


int liveAccountNumber = 123456;
int start() {

if(( AccountNumber() == liveAccountNumber))
{
   Print("Account Verification");
   Alert("Account Number Pass");
   return(1);
}
else
{
   Print("Your Account Not Verification.");
   Alert("Your Account Not Yet Verification");
   return(-1);
}

I hope someone can help me how to make alert only once show in metatrader


Thanks

 
Place it in OnInit().
 
Hanrian Hanrian:

anybody can help how to make alert show only once, my alert always show every second

   static bool is_checked=false;

   if(!is_checked)
     {
      //Do check and alert
      is_checked=true;
     }
 
Carl Schreiber #:
Place it in OnInit().
thank you very much, its work
 
Keith Watford #:
thanks you