Invalid Array Access when using iCustom

 

Hello, I am using iCustom to get information on Support and Resistance levels from a custom indicator I made. (SandR)

I am getting a error when I try to compile: 'SRLevelsArray' - Invalid array access

double SRLevelsArray[];
   int levelsCount = iCustom(Symbol(), PERIOD_CURRENT, "SandR", 
                InpDepth, InpDeviation, InpBackstep, 
                InpGapPoints, InpSensitivity, 
                InpLookback, InpPrefix, 
                InpLineColor, InpLineWeight, 
                0, 0, Bars, SRLevelsArray);

It is worth noting "SandR" is located in the "Indicators" folder and this code snippet is on an EA located in the "Experts" folder. I am pretty new to MQL4 but any change like "Indicators\\SandR.ex4" etc. seems to have no effect. 

Any help would be very appreciated. Thanks!


Edit: this is MQL4

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
  1. iCustom returns a double, not an int.
  2. The second from the last argument is which buffer index you want. Bars is invalid.
  3. The last argument is the bar index (shift) you want. Not an array. 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.