Relative Volatility Index - RVI in iCustom

 
Hello,

I'm new to Meta Trader (Version 4 Build 890 25 Sep 2015) and I do need your precious help.
I have the RVI indicator from https://www.instaforex.com/pt/forex_indicators/rvi.php and want to use it in the https://docs.mql4.com/indicators/icustom way to check if RVI is greater than 50, for my EA.

However, I'm not getting this done.

....
int bars = rates_total - 1;
        if(prev_calculated > 0) bars = rates_total - prev_calculated;

        for(int i = bars; i >= 1; i--)   
        {
                myrviBuffer[i] = iCustom(NULL,0,"instaforex_rvi",14,1,0);
      
        }
...

 

I even tried to display it in a new indicator with no success.
Can you please help me to accomplish this task?

Thank you


 
 myrviBuffer[i] = iCustom(NULL,0,"instaforex_rvi",14,1,0);
  1. Detailed explanation of iCustom - MQL4 forum
  2. Your indicator has only one buffer so why are you trying to read the second one.
  3. You are saving the same value in all your buffer.
 
WHRoeder:
  1. Detailed explanation of iCustom - MQL4 forum
  2. Your indicator has only one buffer so why are you trying to read the second one.
  3. You are saving the same value in all your buffer.

 WHRoeder, your points were very clear to me, and now I got it working.

MYRVIBuffer[i] = iCustom(NULL,0,"instaforex_rvi",14,0,i);

Thank you very much. 

Best regards.

Reason: