Issue with double-buffered plots (e.g. DRAW_COLOR_LINE) causing subsequent arrow plot to ignore arrow code and render as circle.
Hi all,
I’m encountering a rendering quirk with a multi-plot indicator involving arrows and moving averages.
-
Plot 0: Arrow down at bar highs ( DRAW_ARROW , arrow code 233) — renders correctly as expected.
-
Plot 1: Moving average originally drawn as DRAW_LINE (single buffer) — works fine.
-
Plot 1 changed to a plot type that requires two buffers (e.g., DRAW_COLOR_LINE ), using a separate color index buffer.
-
Plot 2: Arrow up at bar lows ( DRAW_ARROW , arrow code 234) — still plots, but ignores the PlotIndexSetInteger(3, PLOT_ARROW, 234) setting and renders as a generic circle instead of the intended arrow.
Plot 2 with index 3 ?
You are confused and mix buffers and plots. 4 buffers from 0 to 3 and 3 plots for 0 to 2.
The detail Alain mentioned is key: PlotIndexSetInteger() works with plot indices, not buffer indices. As you declared only 3 plots (#property indicator_plots 3), the valid indices are 0, 1 and 2. The index 3 you used is not valid as a plot, that's why the arrow code was not applied and a generic symbol is displayed.
You just need to change that line to:
PlotIndexSetInteger(2, PLOT_ARROW, 234);
The detail Alain mentioned is key: PlotIndexSetInteger() works with plot indices, not buffer indices. As you declared only 3 plots (#property indicator_plots 3), the valid indices are 0, 1 and 2. The index 3 you used is not valid as a plot, that's why the arrow code was not applied and a generic symbol is displayed.
You just need to change that line to:
So basically ?
SetIndexBuffer(0, ArrowDownHigh, INDICATOR_DATA); PlotIndexSetInteger(0, PLOT_ARROW, 233); SetIndexBuffer(1, MA, INDICATOR_DATA); SetIndexBuffer(2, ColorLineColors, INDICATOR_COLOR_INDEX); SetIndexBuffer(3, ArrowUpLow, INDICATOR_DATA); PlotIndexSetInteger(2, PLOT_ARROW, 234);
I'm sorry you feel that way but your instructions were vague,@Miguel Angel Vico Alba articulated what you meant to say well, and if this :
SetIndexBuffer(3, ArrowUpLow, INDICATOR_DATA); PlotIndexSetInteger(2, PLOT_ARROW, 234);
is the right way to do it, I didn't see such an explanation in documentation or I may have missed it.
In this case, since only 3 plots were declared, the valid indices for PlotIndexSetInteger() are 0, 1, and 2. Using index 3, even if it's tied to a valid buffer, has no effect because it's not associated with any plot.
In this case, since only 3 plots were declared, the valid indices for PlotIndexSetInteger() are 0, 1, and 2. Using index 3, even if it's tied to a valid buffer, has no effect because it's not associated with any plot.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I’m encountering a rendering quirk with a multi-plot indicator involving arrows and moving averages.
Plot 0: Arrow down at bar highs ( DRAW_ARROW , arrow code 233) — renders correctly as expected.
Plot 1: Moving average originally drawn as DRAW_LINE (single buffer) — works fine.
Plot 1 changed to a plot type that requires two buffers (e.g., DRAW_COLOR_LINE ), using a separate color index buffer.
Plot 2: Arrow up at bar lows ( DRAW_ARROW , arrow code 234) — still plots, but ignores the PlotIndexSetInteger(3, PLOT_ARROW, 234) setting and renders as a generic circle instead of the intended arrow.
This issue is not limited to DRAW_COLOR_LINE , but occurs with any plot type requiring two buffers.
When the MA plot is a single-buffer plot ( DRAW_LINE ), both arrows render correctly.
Switching the MA to a double-buffer plot causes the second arrow’s glyph to be ignored and replaced with a circle.
Below is a minimal proof-of-concept example illustrating this behavior:
Has anyone encountered this? Any ideas on how to force proper arrow glyphs alongside double-buffer plots?
Thanks in advance.