Graphic overlay and label name overlay

 

I have an indicator that plots 3 buffers. The first is a line (buffer number 0) and the other two are arrows (bufer numbers 1 and 2) that lie on that line (see picture). With this order of the buffers, the indicator is plotted in a desirable way (the arrows overlap the line). Unfortunately, when you hover, the label name of that line appears in the bubble, but not the names of the labels of those arrows.

Is it possible to have the arrows graphically overlay the line, but at the same time the names of the labels of those arrows appear in the bubble?

 
Petr Nosek:
Is it possible to have the arrows graphically overlay the line, but at the same time the names of the labels of those arrows appear in the bubble?

Technically, no. Separate buffers can't share the same buffer caption.

2 options off the top of my head:

  • Rewrite your arrow dots as Objects in the foreground, but this is memory intensive.
  • As you appear to be using color changing arrow dots as a color changing line, get rid of the arrow dots and rewrite the line as color changing. Here's another coders example:
 

Thanks for the answer.

Ryan L Johnson #:
Separate buffers can't share the same buffer caption.

We may have misunderstood, but I don't want to share the same buffer caption. My point is that both the graphical plotting and the "text caption" are dependent on the order of the buffers. The first (zero) buffer is graphically plotted at the very bottom, but at the same time its value appears in the caption when the mouse is hovered over.

My question is whether there is any way to disable displaying the value of the lower (e.g. zero) buffer and instead allow displaying the higher (e.g. first) buffer when the mouse is hovered over.

Ryan L Johnson #:
Rewrite your arrow dots as Objects in the foreground

As you write, that's memory intensive, so it's not an option for me.

Ryan L Johnson #:
get rid of the arrow dots and rewrite the line as color changing

Of course, I can program the indicator as a line with changing color, but that is not a suitable solution for me at all, because it has some fundamental limitations.

 
Petr Nosek #:
My question is whether there is any way to disable displaying the value of the lower (e.g. zero) buffer and instead allow displaying the higher (e.g. first) buffer when the mouse is hovered over.

"Pay attention to one important point. Diagrams are plotted on the chart in the order corresponding to their indexes, as a result of which some are visually higher than others (overlap them). In this case, a histogram with index 0 is drawn first, and then a line with index 1 is drawn on top of it. Sometimes it makes sense to change the order of registration of charts in order to provide better visibility of smaller graphical constructions, which may be covered by larger (wider) plots.

Setting such priorities along the imaginary Z-axis, going deep into the screen (perpendicular to the screen) is called the Z-order. We will encounter this technique again when studying graphic objects."

Petr Nosek #:
The first (zero) buffer is graphically plotted at the very bottom
If I understand you correctly, you listed your zero buffer last but still assigned as zero. Try swapping buffers around so that buffer zero is buffer 2.
MQL5 Book: Creating application programs / Creating custom indicators / Buffer and chart mapping rules
MQL5 Book: Creating application programs / Creating custom indicators / Buffer and chart mapping rules
  • www.mql5.com
When registering diagrams using PlotIndexSetInteger(i, PLOT_DRAW_TYPE, type) , each call sequentially assigns a certain number of buffers to the...
 
Ryan L Johnson #:

"Pay attention to one important point. Diagrams are plotted on the chart in the order corresponding to their indexes, as a result of which some are visually higher than others (overlap them). In this case, a histogram with index 0 is drawn first, and then a line with index 1 is drawn on top of it. Sometimes it makes sense to change the order of registration of charts in order to provide better visibility of smaller graphical constructions, which may be covered by larger (wider) plots.

Setting such priorities along the imaginary Z-axis, going deep into the screen (perpendicular to the screen) is called the Z-order. We will encounter this technique again when studying graphic objects."

What you write is perfectly well known, but it doesn't answer my question.

Personally, I don't think it's possible to plot a line at the very bottom (buffer 0) and at the same time disable outputting its value in a bubble. Unlike graphical objects, there is no option to build a Z-order.

Or am I wrong?

 
Petr Nosek #:

What you write is perfectly well known, but it doesn't answer my question.

Personally, I don't think it's possible to plot a line at the very bottom (buffer 0) and at the same time disable outputting its value in a bubble. Unlike graphical objects, there is no option to build a Z-order.

Or am I wrong?

If I understand you correctly, you listed your zero buffer last but still assigned as zero. Try swapping buffers around so that buffer zero is buffer 2. The documentation references "the order of registration."
 
If you're not actually using the line in your strategy, you also might consider setting the line buffer to INDICATOR_CALCULATIONS. This will completely hide it from view.