I am new to MQL4 programming, and I have started to learn programming outside the MQL4 language. So my experience is very lacking.
Now I am trying to make my first EA that only gives at a alert when something is happening. I think it isn't a huge deal to change the alert to a buy, or sell function.
Let me explain:
I am trying to make a EA that gives out a signal when the price is under or above the 200EMA (just for trend confirmation).
When the price is above the 200 EMA and the MACD lines cross, then I need to get a signal to pop-up. With the standard iMACD I think there aren't two lines (signal and macd line), but just the histogram and the MACD line, as in the standard MACD comming with metatrader4.
Now my question is:
How do I make two doubles with the corresponding values of the signal line and the MACDline itself?
I hope that you can help with this problem, and give me a idea on how to tackle this problem!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hi all!
I am new to MQL4 programming, and I have started to learn programming outside the MQL4 language. So my experience is very lacking.
Now I am trying to make my first EA that only gives at a alert when something is happening. I think it isn't a huge deal to change the alert to a buy, or sell function.
Let me explain:
I am trying to make a EA that gives out a signal when the price is under or above the 200EMA (just for trend confirmation).
When the price is above the 200 EMA and the MACD lines cross, then I need to get a signal to pop-up. With the standard iMACD I think there aren't two lines (signal and macd line), but just the histogram and the MACD line, as in the standard MACD comming with metatrader4.
Now my question is:
How do I make two doubles with the corresponding values of the signal line and the MACDline itself?
I hope that you can help with this problem, and give me a idea on how to tackle this problem!
Thanks in advance!
Yours sincerely,
Daan