alarm help please

 
Hello, i have a problem. 
Would anybody have an indicator or an ea on mt4 that will alert me whenever something appears on the chart? Let me explain better: 
I have an indicator that creates the signal on the chart like trend-line etc ... 
I use it on so many charts and so many time frame so it becomes difficult to follow them all so i need something to alert me whenever something appear on the chart. 
I do not even know if it is possible. thank you
Thank you
 
Modify the indicator so that it sends an alarm whenever it creates a new object (that you want notification for)
 

"Please choose which one is possible for you to use"

Displays a message in a separate window.

void  Alert(
   argument,     // first value
   ...           // other values
   );


"Or you can use send notification to your smartphone"

Sends push notifications to the mobile terminals, whose MetaQuotes IDs are specified in the "Notifications" tab.

bool  SendNotification(
   string  text          // Text of the notification
   );


To completion please go to the help page

Common Functions - MQL4 Reference
Common Functions - MQL4 Reference
  • docs.mql4.com
Common Functions - MQL4 Reference
 
Keith Watford:
Modify the indicator so that it sends an alarm whenever it creates a new object (that you want notification for)

Ali irwan:

"Please choose which one is possible for you to use"

Displays a message in a separate window.

void  Alert(
   argument,     // first value
   ...           // other values
   );


"Or you can use send notification to your smartphone"

Sends push notifications to the mobile terminals, whose MetaQuotes IDs are specified in the "Notifications" tab.

bool  SendNotification(
   string  text          // Text of the notification
   );


To completion please go to the help page


the trouble is that the indicator is an ex4 file so it is protected. Can you help me creating an additional indicator that send thes popups when something appear on charts? but without attaching it to the other indicator. thank you

 

Try modifying this to suit your needs

#property strict
#property indicator_chart_window

int OnInit()
  {
   ChartSetInteger(0,CHART_EVENT_OBJECT_CREATE,true);
   return(INIT_SUCCEEDED);
  }

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   return(rates_total);
  }

void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
  {
   if(id==CHARTEVENT_OBJECT_CREATE) Alert("An object called ",sparam," has been created");
  }
 
honest_knave:

Try modifying this to suit your needs


The problem is that the indicator is cripted (ex4 file) so i can't modify it. Is it possible to create one that attached to charts do the same job ( create popups when a line or other is created)?

thanks

 

What I posted is a separate indicator. Compile it and attach to a chart.

 
honest_knave:

What I posted is a separate indicator. Compile it and attach to a chart.


Thank you:)  but...i'm not so good programming,so if you please can help me, which line i have to modify?

 

OK, I think you don't code? In which case, no problem:

Attach my indicator to a chart and see if it does what you need.

If it doesn't, you probably need to take a look at the freelance section.

 
honest_knave:

OK, I think you don't code? In which case, no problem:

Attach my indicator to a chart and see if it does what you need.

If it doesn't, you probably need to take a look at the freelance section.


working, it has a problem because when i have signal by the indicator it creates like 7-10 line in a second so it make a strange sound and probably the sound go in loop, but i ll try to fix it. The other thing i ask you, if you want to, and if it s possible, to write in the alarm, the name of tool and the time frame. if you don't want to do, it s not a problem, thank you anyway...(yea, i don't code):)

 

Re your PM:

#property strict
#property indicator_chart_window

int OnInit()
  {
   ChartSetInteger(0,CHART_EVENT_OBJECT_CREATE,true);
   return(INIT_SUCCEEDED);
  }

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   return(rates_total);
  }

void OnChartEvent(const int id, const long& lparam, const double& dparam, const string& sparam)
  {
   if(id==CHARTEVENT_OBJECT_CREATE)
     {
      Alert(StringFormat("%s - %s - %s created",Symbol(),GetPeriod(),sparam));
     }
  }

string GetPeriod()
  {
   switch(Period())
     {
      case PERIOD_M1:  return("M1");  
      case PERIOD_M5:  return("M5");  
      case PERIOD_M15: return("M15");  
      case PERIOD_M30: return("M30");  
      case PERIOD_H1:  return("H1");  
      case PERIOD_H4:  return("H4");  
      case PERIOD_D1:  return("D1");  
      case PERIOD_W1:  return("W1");  
      case PERIOD_MN1: return("MN1");
      default: return(string(Period()));
     }
  }