I wrote an indicator that draws some rectangles based on user selection. The problem I have is that when the chart shifts left or right (either by user input or more data) the objects stay at their original position naturally.
Is there an event I can subscribe for, or any other method, that would fire when the chart moves so that I can also re position my custom drawn objects?
I read somewhere that the only way to do this is to write your own bar type but it sounds a bit overkill.
Thanks for any help,
Popsicle
Can you help answer these questions from other members on futures io?
How did you draw that rectangle ?
If you did it correctly, it should move automatically, as it will stick to the candles
Are you by any chance, using low level windows GDI calls ?
The following user says Thank You to rleplae for this post:
Thank you very much for your reply. I am drawing the rectangles in the plot override of the indicator with graphics.FillRectangle. Thanks to your reply I am now using DrawRectangle and it is working beautifully.
Thank you very much!
Popsicle
The following user says Thank You to Popsicle for this post: