Download MetaTrader 5

Problem with Alert, Print, SendNotification functions

To add comments, please log in or register
Robert Mihali
6192
Robert Mihali  

hello everyone, I'm working on an ExpertAdvisor to Alert me if some special case appears on the chart and I tried the functions Print, Alert, SendNotification, but non of them works.

 

 

 

I'm fully aware that these 3 functions are not equivalent.

Alert gives an Alert in a separate window.

Print gives out a message in the terminal.

SendNotification sends a push message to my mobile device.

I would like to have the SendNotification function to work, so I can get the Alerts on my smartphone, when I'm not at home, but it would be nice to have all 3 of them work.

Do you know how to fix my problem. I just inserted the code there, but there is no output.

What should I do?

 

thanks a lot 

Keith Watford
Moderator
9644
Keith Watford  

That snippet should work, so there is probably something wrong with the other code

ie. maybe your code only works on new bars. Anything more than M30 and the condition would never be true.

Put it as a stand-alone piece of code in OnTick or whatever and it will work. Then you will get too many alerts 

whroeder1
14785
whroeder1  
Don't paste code
Play video
Please edit your post.
For large amounts of code, attach it.
To add comments, please log in or register