OBJPROP_ZORDER problem

 

Hello,

I'm using z-order in ea for trading buttons but every time I change timeframe it seems that object order is messed up and buttons are still behind other elements in my chart.

 
Zorder Is not for the priority of background or foreground, but just for declaring priority of receiving events.

Priority of what is behind and what is on top depends on the order in which your create your objects

 

I'm using round levels indicator with bunch of lines as bitmap and an EA with buttons.
In EA code for buttons I use:

 ObjectCreate(0,"CloseButton",OBJ_BUTTON,0,0,0);
.................
 ObjectSetInteger(0,"CloseButton",OBJPROP_ZORDER,0);

The thing is that one is indicator and another is ea. I need this ea to be on the top of the objects all the time.

When I change timeframe, that level indicator which objects are as bitmap still covers everything and EA buttons does not work.