Download MetaTrader 5

How can I find the 3 minutes ago RSI value?

To add comments, please log in or register
Cansın Memiş
15
Cansın Memiş  

I tried this but it didn't work. Is there a way to find it in a shortway without arrays or something?

    int iShift = iBarShift(Symbol(), PERIOD_M1, Time[0], false );

    int iShift3 = iBarShift(Symbol(), PERIOD_M1, Time[180], false );

    

    RSI=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, iShift );

    RSI3=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, iShift3 ); 
InvestSoft
12071
Janusz Trojca  
Cansın Memiş:

I tried this but it didn't work. Is there a way to find it in a shortway without arrays or something?

Try this:

    int iShift = iBarShift(Symbol(), PERIOD_M1, Time[0], false );

    int iShift3 = iBarShift(Symbol(), PERIOD_M1, Time[0]-180, false );

    

    RSI=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, iShift );

    RSI3=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, iShift3 ); 

 You must subtract 3 minutes (180 seconds) from current bar start time (Time[0]-180).

Cansın Memiş
15
Cansın Memiş  
Thanks.. 
Hector Pacheco
18234
Hector Pacheco  

Try this:

    RSI=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, 0);

    RSI3=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, 3); 
Siti Latifah
12442
Siti Latifah  
Hector Pacheco:

Try this:

that is
To add comments, please log in or register