- add push notification
- Can anyone help with a new alert notification on mobile phone
- How to Add Sound and Notification Alert
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2018)We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
No free help (2017) -
if (Bid>=Open[0]+Pips*point)Alerts("up "); if (Bid<=Open[0]-Pips*point)Alerts("down ");
Replace the criterion with what you want.
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2018)We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
No free help (2017) -
Replace the criterion with what you want.
Hey guys, can anyone please help me just edit this simple MQ4 indicator to send notifications to my phone when the size of the candle exceeds the set value. I will really appreciate it in advance.
It is quite simple to do.
You know how to do a pop up alert already
string message="Signal"; Alert(message);
For a push notification
string message="Signal"; SendNotification(message);
-
Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2018)We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
No free help (2017) -
Replace the criterion with what you want.
hello there am sorry to bother you again, but I did try to edit the script of the indicator and added some lines for notifications and got an error while debugging. Please help me with the correct line for the mq4 file.
//+------------------------------------------------------------------+
//| Candle Pips Alerter.mq4 |
//| Copyright © 2011, Forex-Programming.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, Forex-Programming.com"
#property indicator_chart_window
extern int Pips = 50;
extern bool Alerts = true;
extern bool PushNotification = true;
double point;
datetime alerttime;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
if (Digits==1)point=0.1;
if (Digits==2)point=0.01;
if (Digits==3)point=0.01;
if (Digits==4)point=0.0001;
if (Digits==5)point=0.0001;
Comments();
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
Comment("");
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
if (Bars<100)return;
if (Bid>=Open[0]+Pips*point)Alerts("up ");
if (Bid<=Open[0]-Pips*point)Alerts("down ");
if (Bid>=Open[0]+Pips*point)PushNotification("up ");
if (Bid<=Open[0]-Pips*point)PushNotification("down ");
return(0);
}
//+------------------------------------------------------------------+
void Alerts(string dir)
{
if (alerttime>=Time[0])return;
if (Alerts)
{
Alert("Price has moved " + dir + Pips + " pips on the " + Symbol() + TFName(Period()));
}
if (PushNotification)
{
SendNotification("Candle Pips Alerter", "Price has moved " + dir + Pips + " pips on the " + Symbol() + TFName(Period()));
}
alerttime=Time[0];
return;
}
string TFName( int tf )
{
switch(tf)
{
case PERIOD_M1: return(" M1"); break;
case PERIOD_M5: return(" M5"); break;
case PERIOD_M15: return(" M15"); break;
case PERIOD_M30: return(" M30"); break;
case PERIOD_H1: return(" H1"); break;
case PERIOD_H4: return(" H4"); break;
case PERIOD_D1: return(" Daily"); break;
case PERIOD_W1: return(" Weekly"); break;
default: return(" Monthly");
}
return;
}
void Comments()
{
return;
}
"Got an error" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
"Got an error" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. (2004)
When asking about code
string TFName( int tf ) { switch(tf) { case PERIOD_M1: return(" M1"); break; case PERIOD_M5: return(" M5"); break; case PERIOD_M15: return(" M15"); break; case PERIOD_M30: return(" M30"); break; case PERIOD_H1: return(" H1"); break; case PERIOD_H4: return(" H4"); break; case PERIOD_D1: return(" Daily"); break; case PERIOD_W1: return(" Weekly"); break; default: return(" Monthly"); } return; } void Comments() { Comment("www.forex-programming.com"); return; }
Be precise and informative about your problem
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
Yes there were 3 errors which showed when debugging the codes. I had tried to add notification as an external boolean.
-
What part of "EDIT your original post, please do not just post the code correctly in a new post " was unclear to you? You did the exact opposite.
-
string TFName( int tf ){ ⋮ } // switch return; Function returns a string. What string are you returning here? } // TFName
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use