Wait till next period

 

Hi guy i have a piece of code that popup a confimation box for signals that is been generated by my EA, but it work good only when i press the yes button to open the trade.

What i need is the way to ignore the signal when i press No, and let the EA to wait till next period before popping up the box again. The code is made by EAbuilder, and i trying to modifiy it to my needs. i not an expert coder, that why im asking for help of anyone. many thanks in advance


mb_ret = MessageBox("Open Buy Order (My Trade Strategy Buy) "+MM_Size() * SinglePositionPercentage * 1.0 / 100+" lots? [MyTradeStrategy @ "+Symbol()+","+Period()+"]", "Manual Order Confirmation", MB_YESNO);
         if(mb_ret == IDYES)
            ticket = myOrderSend(ORDER_TYPE_BUY, price, MM_Size() * SinglePositionPercentage * 1.0 / 100, "My Trade Strategy Buy");
         if(ticket == 0) return;
 
baby noe :

Hi guy i have a piece of code that popup a confimation box for signals that is been generated by my EA, but it work good only when i press the yes button to open the trade.

What i need is the way to ignore the signal when i press No, and let the EA to wait till next period before popping up the box again. The code is made by EAbuilder, and i trying to modifiy it to my needs. i not an expert coder, that why im asking for help of anyone. many thanks in advance


You need a window with two buttons: 'YES "and' NO ':

   int message_box=MessageBox("Message","Caption",MB_YESNO);
   if(message_box==IDYES)
     {
      Print("YES pressed");
     }
   else
      if(message_box==IDNO)
        {
         Print("NO pressed");
        }