Download MetaTrader 5
To add comments, please log in or register
Interested in social trading? Read the article!
Robert Mihali
5879
Robert Mihali 2015.03.02 08:57 

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
7990
Keith Watford 2015.03.02 10:40  

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
13641
whroeder1 2015.03.02 14:24  
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