Download MetaTrader 5
To add comments, please log in or register
Join MQL5 Cloud Network. Millions of traders are waiting for this!
Tradeing Trader
556
Tradeing Trader 2014.07.29 15:35 

Hello,

why does iBandsOnArray(williams,BBPeriode,BBPeriode,BBDeviation,BBShift,MODE_MAIN,0) give me the correct value from current bar, but when i try to get the last closed bar value with writing a 1 to the index shift parameter iBandsOnArray(williams,BBPeriode,BBPeriode,BBDeviation,BBShift,MODE_MAIN,1) why this give me 0 as result and not the last closed bar value from the indicator?

Is there a error in the function or do i make somethink wrong in my codeing?

Keith Watford
Moderator
7862
Keith Watford 2014.07.30 00:24  
(williams,BBPeriode,BBPeriode,BBDeviation,BBShift,MODE_MAIN,1)

Maybe you are not allowing enough elements to be counted?

Try

(williams,0,BBPeriode,BBDeviation,BBShift,MODE_MAIN,1)
/
To add comments, please log in or register