Does anybody know how to get value OHLC on the previous bar?
Dear all,
I’m using MT3 need some advise… does anybody knows how to get value OHLC from the previous bars?
regards,
Andy
I’m using MT3 need some advise… does anybody knows how to get value OHLC from the previous bars?
regards,
Andy
Open[1], High[1], Low[1], Close[1]
Hi Slawa.....tx for your answer....
but one more question.... is it the same way if we want to know the value of indicator in the previuos bars?
for example: I want to know the value of RSI on the last 2 or 3 bars from the current bar.....
but one more question.... is it the same way if we want to know the value of indicator in the previuos bars?
for example: I want to know the value of RSI on the last 2 or 3 bars from the current bar.....
Hi Slawa.....tx for your answer....
but one more question.... is it the same way if we want to know the value of indicator in the previuos bars?
for example: I want to know the value of RSI on the last 2 or 3 bars from the current bar.....
but one more question.... is it the same way if we want to know the value of indicator in the previuos bars?
for example: I want to know the value of RSI on the last 2 or 3 bars from the current bar.....
This is how you do it in MetaTrader 4:
double rsi0 = iRSI(NULL,Period(),14,PRICE_TYPICAL,0); // this bar double rsi1 = iRSI(NULL,Period(),14,PRICE_TYPICAL,1); // previous bar double rsi2 = iRSI(NULL,Period(),14,PRICE_TYPICAL,2); // 2 bars away double rsi3 = iRSI(NULL,Period(),14,PRICE_TYPICAL,3); // 3 bars away
I'm not sure about MT3, but it might be very close.
I’m using MT3 need some advise… does anybody knows how to get value OHLC from the previous bars?
regards,
Andy