Hi there,
How can I draw a rectangle object (indicator) on a fixed place int the chart window (for example: on the left upper corner of the chart window)?
Is it possible?
Thank you!
Hey, of course it's possible. If it were me, I'd delete and redraw the object every time a new bar was formed. That would keep it in the same place. Would that work for you?
Hey, of course it's possible. If it were me, I'd delete and redraw the object every time a new bar was formed. That would keep it in the same place. Would that work for you?
Redraw is OK, but how can I get the fixed position (for coordinates change - new time, new price)?
Redraw is OK, but how can I get the fixed position (for coordinates change - new time, new price)?
Hey ggekko,
I see the problem... Sadly, I think the only objects that can be locked in place are labels. Unfortunately, ObjectGetValueByShift() doesn't work with them so there's no way I see to use a label to find a time/price coordinate to lock your rectangle in place.
I don't know if this would work, but you could create another chart, make it a line chart, make the color the same as background, turn off auto scroll and chart shift and display your indicator like that. You may have to transfer the data to global variables if you don't want two EAs/Scripts/Indicators running at once.
Hope that helps. I look forward to seeing if anyone else has any ideas.
Hey ggekko,
I see the problem... Sadly, I think the only objects that can be locked in place are labels. Unfortunately, ObjectGetValueByShift() doesn't work with them so there's no way I see to use a label to find a time/price coordinate to lock your rectangle in place.
I don't know if this would work, but you could create another chart, make it a line chart, make the color the same as background, turn off auto scroll and chart shift and display your indicator like that. You may have to transfer the data to global variables if you don't want two EAs/Scripts/Indicators running at once.
Hope that helps. I look forward to seeing if anyone else has any ideas.
Thank you, LaBombaGrande.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
How can I draw a rectangle object (indicator) on a fixed place int the chart window (for example: on the left upper corner of the chart window)?
Is it possible?
Thank you!