Thank you for your reply.
Yes, in this case, it looks like this is likely a difference between the drawing objects and how they work between platforms. The drawing objects were rebuilt in NT8 so we will see some differences surrounding the tools.
One specific difference here would be that the Anchors BarsAgo property is not expected to contain a value in all use cases. Manually drawn objects will not contain a value here. The BarsAgo reported is also static for programmatically drawn objects, this will stay the value it was defined as originally. If you used 10 BarsAgo, it would report 10.
You may be able to use something like the following to get the moving BarsAgo from the current bar instead of the static BarsAgo:
Print(Count - (Calculate == Calculate.OnBarClose ? 2 : 1) - ChartBars.GetBarIdxByTime(ChartControl, test.StartAnchor.Time)); or Print(CurrentBar - ChartBars.GetBarIdxByTime(ChartControl, rec.StartAnchor.Time));
I look forward to being of further assistance.
Leave a comment: