-
Don't post pictures of code, they are too hard to read.
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Perhaps you should read the manual.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.Your code Documentation iMACD( NULL, 0, MACD_FastPeriod, MACD_SlowPeriod ? ? ? ? );
double iMACD( string symbol, // symbol int timeframe, // timeframe int fast_ema_period, // Fast EMA period int slow_ema_period, // Slow EMA period int signal_period, // Signal line period int applied_price, // applied price int mode, // line index int shift // shift );
-
Don't post pictures of code, they are too hard to read.
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Perhaps you should read the manual.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.Your code Documentation
Thank you alot
double macd, macd_signal, macd_hist; int signal_period = 12; int applied_price = PRICE_CLOSE; int mode = MODE_EMA; int shift = 0; iMACD(NULL, 0, MACD_FastPeriod, MACD_SlowPeriod, signal_period, applied_price, mode, shift, macd, macd_signal, macd_hist);
I have correct it but still have the same error
I have same error, using 8 parameters as input, but there is error:
'iMACD' - wrong parameters count int iMACD(const string,ENUM_TIMEFRAMES,int,int,int,int)
double macdValue = iMACD(_Symbol, PERIOD_M15, macdFastLength, macdSlowLength, 9, PRICE_CLOSE, 0, 0);
Please, always use the CODE button (Alt-S) when inserting code.
Your question is about MQL5 and this is a MQL4 section. In the future, please post in the appropriate section.
In MQL5, it returns a handle, not a data value. You need to use CopyBuffer to get the values.
Please refer to the MQL5 documentation about it.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Please, I need a help to fix an error of 'iMACD' - wrong parameters count
Please see the code above