|
You should realise that bar number 0 is always in the process of being formed, and you should, in my opinion, never ever attempt to us it for indicator readings. You may use bar open, because that won't change, but bar close as well as high and low will or may change as new tick comes in, until that bar becomes bar number 1 (when a new bar number 0 begins being developed).
Therefore, I would suggest that you change the last argument in the iCustom calls to 1.
|