- You don't check whether the send was successful or not :(
- You don't check the error code in case it fails :(
- for both see here: https://www.mql5.com/en/docs/network/sendnotification
- or place the cursor in the function and press F1
- Have you set up everything acc. to https://www.metatrader5.com/en/terminal/help/startworking/settings#notifications ?

MQL5 Book: Advanced language tools / Network functions / Sending push notifications
- www.mql5.com
As you know, the terminal allows you to send push notifications from MetaQuotes services, the terminal itself, and MQL programs to a mobile device...
Carl Schreiber #:
- You don't check whether the send was successful or not :(
- You don't check the error code in case it fails :(
- for both see here: https://www.mql5.com/en/docs/network/sendnotification
- or place the cursor in the function and press F1
- Have you set up everything acc. to https://www.metatrader5.com/en/terminal/help/startworking/settings#notifications
Thanks , I will do these adjustments. Just a update, the sendnotification started working when I closed the metatrader5 window. The problem I reported above was happening when I did not close the terminal AND put the computer to hibernate.
SendNotification needs a running terminal and running EA or indicator. It wont wok if the terminal is closed or the laptop (?) is in hibernation mode (to my knowledge). Therefore many are using a VPS to shutdown the local terminal.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Friends, I started using the VPS and tested it for making trades when the computer is off and it worked ok.
Problem is I want send myself some notifications using a piece of code like this:
the trade took place correctly, but not the notification. When I use the same piece of code outside VPS (meaning with the computer on, in front of me) the code works and I get the push notification in my phone.
By the way, the Print() also does not work in the VPS.
Anyone knows the solution for this? How to send notification from the VPS to users phone ?