OBJ_RECTANGLE_LABEL problem

To add comments, please log in or register
Tibor Rituper
3101
Tibor Rituper  

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?

Marco vd Heijden
Moderator
12694
Marco vd Heijden  
Please see OBJPROP_BACK and also try to reverse the creation of objects.
Tibor Rituper
3101
Tibor Rituper  
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?

Marco vd Heijden
Moderator
12694
Marco vd Heijden  
it's usually sufficient to swap the order of creation.
Tibor Rituper
3101
Tibor Rituper  
Marco vd Heijden:
it's usually sufficient to swap the order of creation.

thank you

Demos Stogios
213
Demos Stogios  
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

Tibor Rituper
3101
Tibor Rituper  
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

To add comments, please log in or register