Hi I have an EA and I add my Alert function into OnTick()
this is the code
int one=1;
int two=2;
if(Symbol()=="AUDCAD" && one<two){Alert("Buy ",Symbol());}
The alert function but It reapeats every single second...how can I modify to obtain the alrt once a time?
If you want to receive the alert only once, use the following code
int one=1;
int two=2;
static bool hasAlerted = false;
if(Symbol()=="AUDCAD" && one<two && !hasAlerted){
Alert("Buy ",Symbol());
hasAlerted=true;
}
Thanks mate:-)!
I would really appreciate it if you could please help me with a question I asked stackoverflow.com/questions/61132974/…