indicator with notification

To add comments, please log in or register
valfid
48
valfid  
is it possible to make a single notification appear on my mql4 indicator set so that when you change an indicator, you only send me a note? the indicator I have programmed sends me a notification every second until the indicator changes. thank you so much
William Roeder
20208
William Roeder  
valfid: the indicator I have programmed sends me a notification every second

So fix it. Don't alert on a condition, alert on a change in condition.

valfid
48
valfid  
yes but send notifications every second on the whole duration of the change then on a T.F. of 5 minutes for 5 minutes every second sends a notification there is a function to let me get a single notification?
Alain Verleyen
38676
Alain Verleyen  
valfid:

So what ?Fix it.

Post your code if you need coding help.

Mehmet Bastem
1672
Mehmet Bastem  
whroeder1:

So fix it. Don't alert on a condition, alert on a change in condition.

int prevtime=0;

int start()
{
if(Time[0] == prevtime)  return(0);
    prevtime=Time[0];
// only Alert for your chart TimeFrame
//SendNotification(Symbol()+" TF:"+IntegerToString(Period())+" "+"Haskaya BUY: ");
}
Hector Pacheco
24232
Hector Pacheco  
datetime timeBar=0;

int start()
{
   bool isNewBar = (Time[0]!=timeBar);
   timeBar = Time[0];

   // only Alert for your chart TimeFrame
   if(isNewBar) SendNotification(Symbol()+" TF:"+IntegerToString(Period())+" "+"Haskaya BUY: ");
}
To add comments, please log in or register