How can calculate RSI level for result of another indicator?

 

Hi, I am trying to create an EA.

I wanna to calculate RSI level for result of another indicator like Alligator or MA. How can I calculate that?

When I use iRSI method like below, the result is zero!

lips = iAlligator(NULL ,0 ,13 ,8 ,8 ,5 ,5 ,3 ,MODE_SMMA ,PRICE_MEDIAN ,MODE_GATORLIPS ,1);
RSI_1 = iRSI(NULL ,0 ,RSI_PERIOD ,lips ,1);

Is there any library or MQL code to help to me?

Thanks a lot.

 
  1. mohsen.mahmoudi.91: I wanna to calculate RSI level for result of another indicator like Alligator or MA. How can I calculate that?

    Copy the RSI code and change the source data.

          diff=close[i]-close[i-1];
  2. RSI_1 = iRSI(NULL ,0 ,RSI_PERIOD ,lips ,1);
    What is the fourth argument in iRSI. It is certainly not a double! 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.


 
mohsen.mahmoudi.91:

Hi, I am trying to create an EA.

I wanna to calculate RSI level for result of another indicator like Alligator or MA. How can I calculate that?

When I use iRSI method like below, the result is zero!

Is there any library or MQL code to help to me?

Thanks a lot.

why not try the iRSIOnArray

lipsBuffer[i] = iAlligator(NULL ,0 ,13 ,8 ,8 ,5 ,5 ,3 ,MODE_SMMA ,PRICE_MEDIAN ,MODE_GATORLIPS ,i);

RSI[i] = iRSIOnArray(lipsBuffer,RSI_Period,i);//etc 

somrthing like this

 

Example

RSIOnAlligator :

RSI calculated on the Alligator indicator

RSIOnAlligator

 
William Roeder:
  1. Copy the RSI code and change the source data.

  2. What is the fourth argument in iRSI. It is certainly not a double! 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.


Thanks For reply.

1. How can I use, RSI indicator code on expert advisor?

2. yes it is double...

 
Jefferson Metha:

why not try the iRSIOnArray

somrthing like this

Thanks a lot, I will try it.