Graphical/probuilder

DRAWARROWDOWN

DRAWARROWDOWN in ProBuilder draws a downward-pointing arrow at a bar index and price, with an optional COLOURED colour and transparency. Syntax and examples.

Syntax

probuilder
DRAWARROWDOWN(x1, y1) COLOURED(R, G, B, a)

Parameters

NameTypeDefaultDescription
x1integerrequiredBar index where the arrow is drawn.
y1pricerequiredPrice or vertical value where the arrow is placed.
R, G, Bintegerplatform defaultOptional COLOURED red, green and blue components, 0 to 255.
ainteger255Optional alpha (transparency), 0 fully transparent to 255 fully opaque.

How it works

DRAWARROWDOWN runs inside a ProBuilder indicator. It draws a downward-pointing arrow anchored at (x1, y1), where x1 is a bar index and y1 is a price. It is commonly used to flag a potential sell signal above the price bars.

Because it marks a condition on one bar, it is placed inside an IF block that fires only when the signal occurs. Placing the arrow slightly above the high, for example by adding part of the average true range, keeps it clear of the candles. The optional COLOURED clause sets colour and transparency.

Examples

Example 1, Stochastic sell signal (Indicator)

probuilder
// Red down arrow when stochastic turns down from overbought
sto = Stochastic[10,3](close)
signal = Average[5](sto)
rge = AverageTrueRange[10](close)
IF sto[1] > 80 AND sto CROSSES UNDER signal THEN
    DRAWARROWDOWN(BarIndex[1], high[1] + rge/2) COLOURED(255, 10, 10)
ENDIF
RETURN

The arrow sits half an ATR above the previous high when the oscillator crosses down from above 80.

Example 2, Arrow at a moving-average cross (Indicator)

probuilder
// Down arrow when a fast average crosses below a slow one
fast = Average[10](close)
slow = Average[30](close)
IF fast CROSSES UNDER slow THEN
    DRAWARROWDOWN(BarIndex, high) COLOURED(200, 0, 0)
ENDIF
RETURN

Each bearish crossover leaves a red arrow at the bar high.

Example 3, Single arrow on the last bar (Indicator)

probuilder
// One arrow on the current bar only
DEFPARAM DrawOnLastBarOnly = true
DRAWARROWDOWN(BarIndex, high) COLOURED(255, 0, 0, 200)
RETURN

With DrawOnLastBarOnly = true, only the current bar carries an arrow.

Common errors and gotchas

  • Indicator only. DRAWARROWDOWN has no effect in ProScreener, ProOrder or ProBacktest. Keep it in a ProBuilder indicator.
  • Direction is fixed. The arrow always points down. Use DRAWARROWUP for a buy marker or DRAWARROW for a horizontal one.
  • X is a bar index. Passing a price into x1 misplaces the arrow horizontally. Use BarIndex.
  • Overlap with bars. Placing y1 exactly at the high hides the arrow behind the candle. Offset it above the high.