I need to draw a horizontal line that starts at a certain bar in the past and ends at the CurrentBar. I've used Draw.Line to draw the line initially, then I am using line.EndAnchor.SlotIndex += 1; to update it to the CurrentBar.
That works in the Chart, however it does not work properly in the Strategy Analyzer. When debugging, the value of SlotIndex is set to -2147483648, which is Integer.MinValue.
What is a reliable way to achieve what I am trying to do in both environments?
Thanks
Comment