Download MetaTrader 5
To add comments, please log in or register
Unable to find the answer to your question? Use the search!
manus4x
11
manus4x 2015.10.05 08: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


whroeder1
13656
whroeder1 2015.10.05 16: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.
manus4x
11
manus4x 2015.10.05 21: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.

/
To add comments, please log in or register