- Show us your attempt (using the CODE button)
and
state the nature of your problem.
No free help
urgent help.Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum -
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
New candle - MQL4 programming forum
You need to add a SendMail() call next to the Alert() call.
string subject="Alert"; string message="Buy alert is triggered"; SendMail(subject,message);
It's not that difficult to code. To prevent alerting on every tick you need to remember the current bar time:
if(alert condition met) // your alert conditions here { static datetime lastalert=0; datetime bartime=iTime(NULL,0,0); if(lastalert!=bartime) { lastalert=bartime; Alert(...); SendMail(...); } }

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use