A command to draw in foreground

 

Hi guys, could someone please suggest a command to draw an indicator in foreground?

I tried   ObjectSetInteger(0,"My-indicator",OBJPROP_BACK,false);

but the line is still projected under the candles.

 
  1. danerstizz: I tried   ObjectSetInteger(0,"My-indicator",OBJPROP_BACK,false);

    That can only modify objects.

  2. danerstizz: but the line is still projected under the candles.

    Change the chart from foreground. Chart → right-click → properties.

 
Thanks for your answer. The problem is I want the candels on foreground but the line My-indicator on foreground of the foreground. Is that possible?
 
danerstizz #: Is that possible?

I want X to be on top of Y and Y to be on type of X. Is that possible?

 
I understand the logic of you're saying, but I'll try to formulate my query in another way. On the chart I have a series of indicators that I draw on the background while the candles are on the foreground. If I say the indicators are on level 3 and the candles on level 2 is it possible to draw only one indicator on level 1? Does a levels structure exist in mql5 like for example in photoshop?
 
danerstizz #:
I understand the logic of you're saying, but I'll try to formulate my query in another way. On the chart I have a series of indicators that I draw on the background while the candles are on the foreground. If I say the indicators are on level 3 and the candles on level 2 is it possible to draw only one indicator on level 1? Does a levels structure exist in mql5 like for example in photoshop?

No.

Studying the CCanvas Class. How to Draw Transparent Objects
Studying the CCanvas Class. How to Draw Transparent Objects
  • www.mql5.com
Do you need more than awkward graphics of moving averages? Do you want to draw something more beautiful than a simple filled rectangle in your terminal? Attractive graphics can be drawn in the terminal. This can be implemented through the CСanvas class, which is used for creating custom graphics. With this class you can implement transparency, blend colors and produce the illusion of transparency by means of overlapping and blending colors.
 
I'll look into it. Thanks
 
Daniele Nerstini #:

Hi, Alain. It's an old post but I discovered a very interesting thing about the drawing order in the terminal and I'd like to share it. This is the story. I had a button with the name "scale" and a series of graphic lines named "stems".

Both the objects had the ObjectSetInteger(0,"name",OBJPROP_BACK,false);  command because I wanted them on top of other graphics in the background but I also wanted the "scale" button on top of the "stems" lines and that

apparently wasn't possible. Then I had the idea to modify the button name into "A-scale" and it came on top of the "stems" lines. So, I didn't try further because I had my result but apparently, you can have innumerous layouts

order just applying the alphabet order to the objects names. That's fantastic! Following that logic A should be on top of B but AA should be on top of AB and so on although I've not tried that extensively.

No. Your"A-scale" was on the top because it was redrawn. The last drawn object is always on top, the name is irrelevant.

Anyway, the topic question is about indicators, not objects.

 
of course, you are right, wrong conclusion, post deleted, thanks.
 
@Daniele Nerstini #: of course, you are right, wrong conclusion, post deleted, thanks.

Please don't delete posts or their content. It breaks the narrative of the thread.

Instead, edit it and strike out your comment for example, and add an explanation.

Reason: