OBJ_RECTANGLE_LABEL problem

 

Hi guys,

In my project I'm using an OBJ_RECTANGLE_LABEL object to draw a fixed position rectangle.

It works fine, but I have a problem.

When I open and close positions with my expert advisor, these methods draw arrows and lines on the chart (that's normal).

When those objects get my fixed position rectangle,  I see them over-drawn my rectangle.

I want to see those object behind my rectangle.

I tried to redraw the rectangle in every tick, that worked, but the rectangle flashed, so not the best solution.


Any idea, how to solve this?

 
Please see OBJPROP_BACK and also try to reverse the creation of objects.
 
Marco vd Heijden:
Please see OBJPROP_BACK and also try to reverse the creation of objects.

I tried the back property, but not solution, because when I open a trade with an expert I can't set the back property of the arrows.

Only solution, I set the back property on every object, except the rectangle?

 
it's usually sufficient to swap the order of creation.
 
Marco vd Heijden:
it's usually sufficient to swap the order of creation.

thank you

 
Tibor Rituper:

I tried the back property, but not solution, because when I open a trade with an expert I can't set the back property of the arrows.

Only solution, I set the back property on every object, except the rectangle?

Well, you have said so as well, you have to set OBJPROP_BACK for newer arrows and lines. But you do not have to do it on every single tick, you can wait for CHARTEVENT_OBJECT_CREATE

greets

 
Demos Stogios:

Well, you have said so as well, you have to set OBJPROP_BACK for newer arrows and lines. But you do not have to do it on every single tick, you can wait for CHARTEVENT_OBJECT_CREATE

greets

good idea, ty

Reason: