How to display an Indicator's Background on top of the Candles and other Indicators
You need to untick the 'Chart on Foreground' option in right click on the chart >> Properties >> Common tab.
xBraf #:
Thanks for the reply, but I it is already unticked.
Do you know any other way? Possible in code?
Thanks for the reply, but I it is already unticked.
Do you know any other way? Possible in code?
On a closer look I see that your objects are above the chart, so your problem is that you need a background color in this rectangle of your indicator.
I am not a coder myself, so wait for someone who knows to tell you how to do it.
xBraf: I've modified this indicator but somehow candles and other indicators display on top of its background. How to get the Background on top of the candles and any other indicator? I tested modifying this but it's not working:
If you need help with your code, you will need to show your code (at least all the relevant parts).
Fernando Carreiro #: If you need help with your code, you will need to show your code (at least all the relevant parts).
Hello, Thanks, I attached the code in original post but it seems removed. Here's the full script:
Files:
CM_Strength.mq4
21 kb
Fernando Carreiro #:
Please don't use externally linked files. Attach the file directly in your post using the functionality provided with the "+ Attach file" button —
Files:
CM_Strength_TF_Vx.mq4
21 kb
xBraf:
Hello,
I've modified this indicator but somehow candles and other indicators display on top of its background.
How to get the Background on top of the candles and any other indicator?
I tested modifying this but it's not working:
Hello,
I've modified this indicator but somehow candles and other indicators display on top of its background.
How to get the Background on top of the candles and any other indicator?
I tested modifying this but it's not working:
https://www.mql5.com/en/forum/460088#comment_51542151
Set OBJPROP_BACK to false
ObjectSetInteger(chart_ID,name,OBJPROP_BACK,false);
In
void SetPanel(string name, int sub_window, int x, int y, int width, int height, color bg_color, color border_clr, int border_width) { if(ObjectCreate(0,name,OBJ_RECTANGLE_LABEL,sub_window,0,0)) { ObjectSetInteger(0,name,OBJPROP_XDISTANCE,x); ObjectSetInteger(0,name,OBJPROP_YDISTANCE,y); ObjectSetInteger(0,name,OBJPROP_XSIZE,width); ObjectSetInteger(0,name,OBJPROP_YSIZE,height); ObjectSetInteger(0,name,OBJPROP_BGCOLOR,bg_color); ObjectSetInteger(0,name,OBJPROP_BORDER_TYPE,BORDER_FLAT); ObjectSetInteger(0,name,OBJPROP_WIDTH,border_width); ObjectSetInteger(0,name,OBJPROP_CORNER,CORNER_LEFT_UPPER); //ObjectSetInteger(0,name,OBJPROP_STYLE,STYLE_SOLID); ObjectSetInteger(0,name,OBJPROP_BACK,false); ObjectSetInteger(0,name,OBJPROP_SELECTABLE,0); ObjectSetInteger(0,name,OBJPROP_SELECTED,0); //ObjectSetInteger(0,name,OBJPROP_HIDDEN,true); ObjectSetInteger(0,name,OBJPROP_ZORDER,0); } ObjectSetInteger(0,name,OBJPROP_BGCOLOR,bg_color); }
MT4 Indicator DRAW_ARROW Z Order
- 2024.01.06
- hsharghi
- www.mql5.com
I've created an indicator to draw an arrow in the middle of a candle...
I've modified this indicator but somehow candles and other indicators display on top of its background.
How to get the Background on top of the candles and any other indicator?
I tested modifying this but it's not working: