automatic stop of 5 min after first alert

 

Hello i want that there is stop from 5 minuten after my first alert  (repeating), can somehelp me?

This is my code where i think i need to put it?

 if(ArrowsBuy[0] != EMPTY_VALUE)

   {

      if(AlertsOn)

      {

         if (AlertsOnCurrent)

         int  whichBar = 0;

         else whichBar = 1;{

         BOAT_DoCall();

         doAlert(whichBar,MessageUp);

         }

      }

      if(ShowLabels) AddLabels(MessageUp);

   }

   

   if(ArrowsSell[0] != EMPTY_VALUE)

   {

      if(AlertsOn)

      {

         if (AlertsOnCurrent)

              whichBar = 0;

         else whichBar = 1;{

         BOAT_DoPut();

         doAlert(whichBar,MessageDn);

         }

      }

      if(ShowLabels) AddLabels(MessageDn);

   }



   return(0);

}

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

  void doAlert(int forBar, string doWhat)

{

   static string   previousAlert = "Nothing";

   static datetime previousTime;

   string message;



   if (previousAlert != doWhat && previousTime != Time[forBar])

   {

       previousAlert  = doWhat;

       previousTime   = Time[forBar];



       message = StringConcatenate(Symbol()," - ",TimeFrameToString(Period())," - "+UniqueID+": ",doWhat);

          if (AlertsMessage) Alert(message);

          if (AlertsEmail)   SendMail(StringConcatenate(Symbol(),""+UniqueID+": "),message);

          if (AlertsPush)    SendNotification(message);

          if (AlertsSound)   PlaySound("alert2.wav");

   }

} 
 
zedzed1:

Hello i want that there is stop from 5 minuten after my first alert  (repeating), can somehelp me?

This is my code where i think i need to put it?

Hello zedzed1,

The code you've posted has some non-defined functions. So, what you've posted it's virtually useless for someone trying to help you with your problem.

Please try to better describe your problem, so you can get a good answer.

Regards,
Malacarne 

 
You can set a timer for that.
Reason: