Download MetaTrader 5
To add comments, please log in or register
Move from theory to practice. Code Base will help you!
JPS1
239
JPS1 2014.02.12 04:24 

Older versions of MetaTrader would stack chart objects according to their name, so if an object was accidentally deleted (which happens quite often), the Indicator or EA could create it again and it would stay behind another chart object if that is where it belonged. This is no longer the case :( Objects are now stacked based on the order they appear within the code. The downside to this is when an object is deleted by mistake, it will be created again YES, but will appear on top of other objects. I build several items that show information on the chart. Some of these are to ALWAYS stay as background items. Can we go back to stacking objects based on their name? - or is there another way to have items stack correctly without having to delete and recreate them at every new tick?


For clarification I am referring to how objects appear on the chart (not how they appear in the object list). MetaTrader 5 handles this correctly as does older builds of MetaTrader4.

Thank you

Alain Verleyen
Moderator
28702
Alain Verleyen 2014.02.12 10:58  
JPS:

Older versions of MetaTrader would stack chart objects according to their name, so if an object was accidentally deleted (which happens quite often), the Indicator or EA could create it again and it would stay behind another chart object if that is where it belonged. This is no longer the case :( Objects are now stacked based on the order they appear within the code. The downside to this is when an object is deleted by mistake, it will be created again YES, but will appear on top of other objects. I build several items that show information on the chart. Some of these are to ALWAYS stay as background items. Can we go back to stacking objects based on their name? - or is there another way to have items stack correctly without having to delete and recreate them at every new tick?


For clarification I am referring to how objects appear on the chart (not how they appear in the object list). MetaTrader 5 handles this correctly as does older builds of MetaTrader4.

Thank you

Maybe ObjectSetInteger() with OBJPROP_BACK. See mql4 help with F1.

JPS1
239
JPS1 2014.02.13 02:54  

Thank you for responding angevoyageur

However, this gives option of background or foreground only. If a user needs to stack 3 or more objects, this won't help.

What would be nice is for the newer builds to work like the older MT4 builds and like the current MT5 in how chart objects are visually displayed.

Consistency in coding.

Alain Verleyen
Moderator
28702
Alain Verleyen 2014.02.13 20:12  
JPS:

Thank you for responding angevoyageur

However, this gives option of background or foreground only. If a user needs to stack 3 or more objects, this won't help.

What would be nice is for the newer builds to work like the older MT4 builds and like the current MT5 in how chart objects are visually displayed.

Consistency in coding.

I can only suggest you to write to ServiceDesk, to make Metaquotes this suggestion.

or maybe ObjectSetInteger() with OBJPROP_ZORDER.

JPS1
239
JPS1 2014.02.25 21:46  

For the record, I tried ZORDER. No luck and I think I know why (see below).


I think we've got another bug here :( You don't have to write code to see it.


Do this. With the text tool put two text objects on a chart. Each different color (such as one black and one white).

Place one on top of other so that it partially covers the second text object.

Restart your platform. The objects magically switch stacking order!

Restart again and they switch back to original stacking order.

Continue restarting, an endless cycle of text switching their stacking order.

Ovo Cz
2958
Ovo Cz 2014.02.25 22:09  

I lost two days playing with graphics. I have to say the quality of the graphic package is very poor. First, it is incomplete. Second, it is buggy.

Could someone tell us, which graphics objects are implemented, and which of their properties do work currently? Otherwise it is really pain to code with it, it is not even testing, it is like a blind shooting, and then snooping whether the target is bleeding from the place I was aiming, and then investigating the reason why it is not.

JPS1
239
JPS1 2014.02.25 23:46  
I hear ya Ovo. I've done the same thing, wasting several afternoons trying to figure out what was going on. There is no work around, so unfortunately I have to give up until it's fixed. MetaTrader has always done a great job at listening and fixing bugs when they are presented, so I'm sure it's just a matter of the next build for a fix to be released (fingers crossed).
/
To add comments, please log in or register