Help Reading Indicators

 

Hello,

I'm trying to read values from a indicator, I need the current value and the "Current-1" value.

I dont really understant the syntax of the command, let say iRSI(NULL,0,14,PRICE_CLOSE, 0) is the value from the current tick? and to read the "current -1" is iRSI(NULL, 0,14,PRICE_CLOSE,1) ?

I've tried this, but the values are different from the chart.

Thanks,

 

The last digit is the bar number, 0 for current, and 1 for the prior bar, so yo have that right.

"I've tried this, but the values are different from the chart."

I don't know what you are comparing to. Different people write indicators with different methods of calculation.
Not all are "correct". Also, you have to verify that the settings of the indicator on the chart match the settings
chosen for the iRSI() function assuming they use the same calculations.

If you are using some custom RSI indicator, a better choice might be to use the iCustom() function.

Reason: