Download MetaTrader 5

SHI_SilverTrendSig

To add comments, please log in or register
JakobsMJ02
15
JakobsMJ02  

Good Day


I'm a still learner trader would appreciate if someone can please edit the attached indicator to give pop up and email alerts.


Thank You

Files:
Mohammad Soubra
30940
Mohammad Soubra  
JakobsMJ02:

Good Day


I'm a still learner trader would appreciate if someone can please edit the attached indicator to give pop up and email alerts.


Thank You


Your question answer is to use the both of the below functions:

SendMail();


and

SendNotification();


SendMail

Sends an email at the address specified in the settings window of the "Email" tab.

bool  SendMail( 
   string  subject,       // header 
   string  some_text      // email text 
   );

Parameters

subject

[in]  Email header.

some_text

[in]  Email body.

Return Value

true – if an email is put into the send queue, otherwise - false.

Note

Sending can be prohibited in settings, email address can be omitted as well. For the error information call GetLastError().

SendMail() function does not work in the Strategy Tester.


...

SendNotification

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

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

Parameters

text

[in]   The text of the notification. The message length should not exceed 255 characters.

Return Value

true if a notification has been successfully sent from the terminal; in case of failure returns false. When checking after a failed push of notification, GetLastError () may return one of the following errors:

  • 4250 – ERR_NOTIFICATION_SEND_FAILED,
  • 4251 – ERR_NOTIFICATION_WRONG_PARAMETER,
  • 4252 – ERR_NOTIFICATION_WRONG_SETTINGS,
  • 4253 – ERR_NOTIFICATION_TOO_FREQUENT.

Note

Strict use restrictions are set for the SendNotification() function: no more than 2 calls per second and not more than 10 calls per minute. Monitoring the frequency of use is dynamic. The function can be disabled in case of the restriction violation.

SendNotification() function does not work in the Strategy Tester.

JakobsMJ02
15
JakobsMJ02  

Thanks Soubra

Thing is i'm clueless with programming was hoping for the indicator to be edited , Then I can just load it to the chart,

Alain Verleyen
Moderator
33365
Alain Verleyen  

Forum on trading, automated trading systems and testing trading strategies



Welcome,

  • Usually people who can't code don't receive free help on this forum, though it could happen if you are lucky, be patient.
  • If you show your attempts and describe well your problem, you will most probably receive an answer from the community.
  • If you don't want to learn to code, nothing bad, you can either look at the Codebase if something free already exists, or in the Market for paid products (sometimes free also).
  • Finally, you also have the option to hire a programmer in the Freelance section.

Good luck.


To add comments, please log in or register