too much alarts how to close

 

furter to some setting. it create a lot of alarts. 

i stop all EA. it should be no ne alarts.


but how can i close it all. it pop up all the time. 


Thx








Iu

 
fxprowinson:

furter to some setting. it create a lot of alarts. 

i stop all EA. it should be no ne alarts.

but how can i close it all. it pop up all the time. 

  1. Speak English. “furter” and “alarts” are not words.
  2. Fix your EA.
  3. Correct.
  4. Fix your EA.
 
fxprowinson:

furter to some setting. it create a lot of alarts. 

i stop all EA. it should be no ne alarts.


but how can i close it all. it pop up all the time. 


Thx








Iu

Store the time of the event and alert time then compare them when ever you have to send alerts. But I'm also still learning

if(EA could not find recovery sell && !FirstAlert)
  {
   EventTime = TimeCurrent();
   Alert("EA coulf not....");
   FirstAlert=true;
  }
if(AlertTime != EventTime)
  {
   FirstAlert = false;
   AlertTime = EventTime;
  }

 
fxprowinson:

furter to some setting. it create a lot of alarts. 

i stop all EA. it should be no ne alarts.


but how can i close it all. it pop up all the time. 


Thx








Iu

My understanding is that you want the alert to trigger once but no more - one way is to record the time of the alert and use that as a filter.

If you want the alert to fire again, reset lastAlertTime to 0 again


//+------------------------------------------------------------------+
//|                                         428669-AlertOnceOnly.mq5 |
//|                                  Copyright 2022, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
// https://www.mql5.com/en/forum/428669
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
datetime lastAlertTime = 0;

void OnTick()
  {
   if(lastAlertTime == 0)
     {
     lastAlertTime = TimeCurrent();
     Alert("Alert at " + TimeToString(lastAlertTime, TIME_SECONDS));
     }
   
  }
//+------------------------------------------------------------------+
 
William Roeder #:
  1. Speak English. “furter” and “alarts” are not words.
  2. Fix your EA.
  3. Correct.
  4. Fix your EA.

https://www.mql5.com/en/forum/172166

@William Roeder please observe

  1. Please be polite when communicating on this website. Refrain from statements that may offend or insult other users.
General rules and best pratices of the Forum.
General rules and best pratices of the Forum.
  • 2017.03.09
  • www.mql5.com
General rules, enforced by moderators : ‌...
 
R4tna C #:

https://www.mql5.com/en/forum/172166

@William Roeder please observe

  1. Please be polite when communicating on this website. Refrain from statements that may offend or insult other users.

Yes I agree. New members will always hate him once he replies to their topic without solution just asking them "How To Ask Questions The Smart Way".

Well I've read that, and now I know why he is acting like that.

Anyway this kind of behaviour is not good\acceptable for most, might be good\acceptable for those "hackers" though