Relative Volatility Index - RVI in iCustom

Back to topics list To post a new topic, please log in or register
avatar
3
manus 2015.10.05 10:39
 
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


avatar
12983
WHRoeder 2015.10.05 18:30 #
 
 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.
avatar
3
manus 2015.10.05 23:44 #
 
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.

Back to topics list  

To add comments, please log in or register