Hi all,
new to MQL4.
I would like to build a simple 50 EMA that send out an email to me when price closed below or above it.
Can anyone can give me some codes to start with?
Thank in advance.
Use macd with alerts and set the fast ema period to 1 and slow period to ema period that you want to use: that will be exactly the same as what you are looking for
Thank you Mladen. Did you mean just use the MACD indicator directly instead of using MQL4 to code?
Thank you Mladen. Did you mean just use the MACD indicator directly instead of using MQL4 to code?
Anyway I just tried to play around withthe MACD indicator in MT4 directly. There's no option for me to set any alert.
Thank you Mladen. Did you mean just use the MACD indicator directly instead of using MQL4 to code?
What I meant is that instead of using some ema indicator written for that purpose, you can use some existing macd with alerts (and there are a lot of existing custom macd indicators with alerts on zero cross)
What I meant is that instead of using some ema indicator written for that purpose, you can use some existing macd with alerts (and there are a lot of existing custom macd indicators with alerts on zero cross)
Ok. I will google for that and try to learn from the codes :)
thank you.
Use macd with alerts and set the fast ema period to 1 and slow period to ema period that you want to use: that will be exactly the same as what you are looking for
This do not work as espected Mladen... I set fast EMA to 1 and slow to 200 and can not see the cross of them at the price touching 200...
This do not work as espected Mladen... I set fast EMA to 1 and slow to 200 and can not see the cross of them at the price touching 200...
Try this one.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
new to MQL4.
I would like to build a simple 50 EMA that send out an email to me when price closed below or above it.
Can anyone can give me some codes to start with?
Thank in advance.