ICustom compile error "wrong parameters count"

 

After getting the indicator name to feed in the code below so that I can get the value, I am getting a compile time error.

Any idea how to get the value of the indicator "RSI" printed out?

Thanks

      Print("indicator short name is: " + ChartIndicatorName(0,1,0));   // reported RSI(14)
      Print("RSI is: ", iCustom(NULL,0,"RSI(14)",14));
Files:
Capture.PNG  22 kb
 
I don't think you have no idea about RSI function ..
It is so simple as iRSI(...) not iCustom()
 
  1. You don't have a <datafolder>\MQL4\Indicators\RSI(14).ex4 do you? Then it's not a custom indicator.
              Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 17.02.2014

  2. Perhaps you should read the manual.
    Your code
     Documentation
    iCustom(
       NULL,
       0,
       "RSI(14)",
       14 ? input or mode or shift
       ?                          
       ?                          
    )
    double  iCustom(
       string       symbol,           // symbol
       int          timeframe,        // timeframe
       string       name,             // path/name of the custom indicator compiled program
       ...                            // custom indicator input parameters (if necessary)
       int          mode,             // line index
       int          shift             // shift
       );
              iCustom - Technical Indicators - MQL4 Reference

  3. Try coding the RSI
              Technical Indicators - MQL4 Reference
Reason: