Download MetaTrader 5
To add comments, please log in or register
Millions of traders download codes from MQL5 library. Share your app with them!
zedzed1
667
zedzed1 2015.02.18 12:44 

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");

   }

} 
Rodrigo Malacarne
Moderator
9596
Rodrigo Malacarne 2015.02.19 11:28  
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 

Roni Nafrianto
4403
Roni Nafrianto 2015.02.25 06:38  
You can set a timer for that.
/
To add comments, please log in or register