I’ve been banging my head against my desk trying to make a non-repainting zigzag on tick by tick data without the inbuilt function. I couldn’t find the bug in my code so I went right down to see exactly what values are returned by barindex[] and close[]. I don’t know if this is a known issue but it seems that barindex[], close[] and the related functions are not updating correctly. To test this I used the following code:
DRAWSEGMENT(barindex[1],close[1],barindex[0],close[0]) COLOURED(255,255,255)
RETURN
This should draw a line that follows the tick centre price line but it’s all over the place. Is there a workaround?
Sorry for late reply. The code is working ok for me on v11 on a 1-tick chart. What was the instrument tested please?
Hi Nicolas,
I’m with IG so I’ve on v10.3. The ticker is US500 (SPX).
Thanks!
You are right, something is wrong in version 10.3. I will report it, please do the same and refer this topic web link into your message.