ICustom compile error "wrong parameters count"

Essam Daoud
Essam Daoud  

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?


      Print("indicator short name is: " + ChartIndicatorName(0,1,0));   // reported RSI(14)
      Print("RSI is: ", iCustom(NULL,0,"RSI(14)",14));
Capture.PNG 22 kb
Mohammed Abdulwadud Soubra
Mohammed Abdulwadud Soubra  
I don't think you have no idea about RSI function ..
It is so simple as iRSI(...) not iCustom()
William Roeder
William Roeder  
  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
       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