'iMACD' - wrong parameters count

 
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); 

Hello, 

Please, I need a help to fix an error of 'iMACD' - wrong parameters count

Please see the code above

 
  1. 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

  2. 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
       );

 
William Roeder #:
  1. 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

  2. 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

 
I have correct it but still have this same error 
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

 
Hamid Lehyan #: I have correct it but still have this same error 

No, you didn't. You went from four (4) parameters to eleven (11). The call only has eight (8). No more, no less.

 

 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);
Improperly formatted code edited by moderator.
 
aleksejs1612 # I have same error, using 8 parameters as input, but there is error: 

Please, always use the CODE button (Alt-S) when inserting code.

Code button in editor

 
@aleksejs1612 #I have same error, using 8 parameters as input, but there is error: 

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.

Reason: