Alert — Displays a message in a separate window.
void Alert( argument, // first value ... // other values );
First, Thanks for the reply.
I know this method, but what I'm trying to do is to have the alert activated just when the current price of a symbol reaches a specific price, like we can do in the "Alerts" tab in the toolbox.
The Alert() function don't have a parameter to specify a price to trigger the alert since I know.
There is some way to implement this? Any ideas?
Thanks in advance.
Then obviously you have to program your Indicator or EA do that. It has to monitor the price and when it reaches a specified value, it calls the Alert function. In other words you have to learn to code in MQL.
Is possible to do this via MQL5 somehow?
Of course, it's possible; code it.
static double priceUp=DBL_MAX; double Bid=…; if(Bid >= priceUp){ Alert(…); priceUp = DBL_MAX; } ⋮ if(isNewAlert) priceUp=…;
Then obviously you have to program your Indicator or EA do that. It has to monitor the price and when it reaches a specified value, it calls the Alert function. In other words you have to learn to code in MQL.
Thanks for your reply again.
I was hoping that MQL had some function with this functionality, since you confirmed that it's not, I will try to code myself.
Thank you, I will consider this post as closed.
@Fernando Carreiro already answered that I will have to write code for this functionality since MQL doesn't have one. Thanks for the example, will be useful down the road.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
What I want to do is to create price alerts the same way we can do via MT5 Terminal Program ("Alerts" tab in the MT5, where we can define a price, condition, symbol, etc...
Is possible to do this via MQL5 somehow?