I have manually drawn a rectangle on my chart and have written code to try to get the rectangle properties.
When I run the indicator, I can print the object properties for the rectangle using DrawObject but it does this for every bar.
I can get the properties for the object but do not know how to get the properties for the rectangle (such as StartBarsAgo, StartTime, StartY, etc).
How do I print the properties for the rectangle on the last bar of the chart so I do not end up with multiple print statements for the same rectangle ? When the properties have been printed once on the last bar, I would like to continue to print in real time for each successive bar when it has closed.
I also want to print the rectangle properties in the same way.
I have attached my code below.
Any help or suggestions would be most appreciated.
Thanks
Comment