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ş 2015.10.26 15:42 

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
8703
Janusz Trojca 2015.10.26 15:59  
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ş 2015.10.27 11:55  
Thanks.. 
Hector Pacheco
15591
Hector Pacheco 2015.10.27 16:47  

Try this:

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

    RSI3=iRSI(NULL, PERIOD_M1, RSILength, PRICE_CLOSE, 3); 
Siti Latifah
6865
Siti Latifah 2015.11.02 15:59  
Hector Pacheco:

Try this:

that is
To add comments, please log in or register