Establishing the Hierarchical Order of Chart Draws of Lines and Labels - page 2

 
angevoyageur:

Thank you.

Isn't exactly the usage of OBJPROP_ZORDER ?


Don't know, I haven't used that yet.


Why placing objects on top of each other, seems weird to me.

I think it's to achieve certain effects, for example giving a specific background colour to a text label. Perhaps it can be done with the "new" mql4 with panel type functionality ?
 
RaptorUK:
Don't know, I haven't used that yet.


Me neither.


I think it's to achieve certain effects, for example giving a specific background colour to a text label. Perhaps it can be done with the "new" mql4 with panel type functionality ?


Probably, but the OP should better describe what he is trying to do, rather than reacting like a capricious child.
 
angevoyageur: Me neither. Probably, but the OP should better describe what he is trying to do, rather than reacting like a capricious child.
Yeah the OP could be more forth-coming. I've tried the following codes
#property indicator_chart_window

void start(){
   string   ObjNameArray[]={"A","B","C"};
   color    ObjColoArray[]={clrAqua,clrBlue,clrCoral};
   int      iArraySize=ArraySize(ObjNameArray);
   
   for(int i=0; i<iArraySize; i++){
   //for(int i=ArraySize(ObjNameArray)-1; i>=0; i--){
      ObjectDelete(ObjNameArray[i]);
      ObjectCreate(ObjNameArray[i],OBJ_ARROW_THUMB_UP,0,Time[0],Open[0]);
      ObjectSet(ObjNameArray[i],OBJPROP_COLOR,ObjColoArray[i]);
      ObjectSet(ObjNameArray[i],OBJPROP_ZORDER,MathAbs(iArraySize-i));
   }
}

The objects are still placed on top of each other (in the order they're created).

This is the behavior I expected when I tried to use objects the first time.

Rather in the old_mt4, they're placed on top of each other (in alphabetical order).

I believe RaptorUK give a good example with the text-background. However.

Couldn't someone just create the background objects first ... then text goes on top?

Anyways, I think the OP suffers from wanting to place his objects behind 3rd party objects (which he has no control over).

I believe the zOrder is for priority of clicking events. (but maybe isn't working yet).

 
SDC: and why is the draw sequence of an indicator an issue with anything,
angevoyageur: Why placing objects on top of each other, seems weird to me.
ubzen: Rather in the old_mt4, they're placed on top of each other (in alphabetical order).
  1. A reason for multiple overlayed objects (and the existence of reverse alphabetical ordering) was given in Displaying of Support/Resistance Levels - MQL4 Articles - Lower TF lines on top of the wider higher TF ones.
  2. So now, instead of depending on the undocumented behavior given there (and the terminal overhead of keeping objects in sorted order,) the code needs to create them in a different order. Big deal OP.
 
traderathome:

Fine, I will be most happy to. When I go to Service Desk, there is no panel that opens to allow me to enter a new topic nor to reply to anything already posted. I also "searched" this url for instructions on how to post to the Service Desk and received nothing for my effort! It appears to be a forum closed to the riffraff and only "privileged" folks are permitted to spout off there!

So, RaptorUK, since you seem to be one of the "privileged" why don't you just copy/paste the essence of my reply that is here onto the Service Desk for me. Either that, or why not be helpful in a different way and simply explain just how someone new is to gain access to post on the Service Desk!

RaptorUK, you made a suggestion which you knew would be a blind alley for me. Thank you so much for your "help".

TraderAtHome, I know you are frustrated and angry and want to smash everything in sight, but calm down. Some of these users are actually trying to help you out.

For example, RaptorUK has provided you with "detailed" instructions on how to contact the ServiceDesk in order to put your case to them. In your understandable rage, you probably overlooked the "details", but they are clear and the Service Desk page is actually quite easy to use.

To help you out I am requoting his words and adding a few of my own:

  • "Logon to the mql5 forum, if you don't have a user ID you will need to register. Once logged in go to your Profile, then on the left hand side of the page there is a link to the Service Desk."
  • Then, just simply select the option on the top banner " New request " and then simply fill in the data fields and description. Quite simple actually.

Remember to be calm and clear headed and offer to the best of your knowledge detailed descriptions, so that the developers can come up with a solution and implement the idea.

Best of luck!

 

So the thread is about placing multiple objects in the same location and establishing which object will be the on top object when clicking on them, well why didnt you say that OP ? lol

I believe angevoyaguer is correct, OBJPROP_ZORDER allows to give one object priority over the others. When clicking on objects that are stacked/layered/on top of each other the one with the higher priority will respond.

 
SDC:

So the thread is about placing multiple objects in the same location and establishing which object will be the on top object when clicking on them, well why didnt you say that OP ? lol

I believe angevoyaguer is correct, OBJPROP_ZORDER allows to give one object priority over the others. When clicking on objects that are stacked/layered/on top of each other the one with the higher priority will respond.

Priority when selected ? or order in which they are drawn ? it is the latter that the OP wants . . . I believe.
 

Yes it is supposed to be the highest priority one will receive the mouse click. If he wants the last one drawn to be selected by a mouse click event he could give that one the higher priority.

 
SDC:

Yes it is supposed to be the highest priority one will receive the mouse click. If he wants the last one drawn to be selected by a mouse click event he could give that one the higher priority.

I don't think the issue is about selecting the correct Object, I think it's about what is visible on top of what, to see a text label on top of a text label used a s a background the text has to be in front of the background.
 

oic .. well shouldn't the last one drawn be the visible object ?