Graphical/probuilder

DRAWARROWUP

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

Syntax

probuilder
DRAWARROWUP(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

DRAWARROWUP runs inside a ProBuilder indicator. It draws an upward-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 buy signal below 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, so arrows accumulate at each qualifying bar. Placing the arrow slightly below the low, for example by subtracting part of the average true range, keeps it clear of the candles. The optional COLOURED clause sets colour and transparency.

Examples

Example 1, Stochastic buy signal (Indicator)

probuilder
// Green up arrow when stochastic turns up from oversold
sto = Stochastic[10,3](close)
signal = Average[5](sto)
rge = AverageTrueRange[10](close)
IF sto[1] < 20 AND sto CROSSES OVER signal THEN
    DRAWARROWUP(BarIndex[1], low[1] - rge/2) COLOURED(10, 255, 10)
ENDIF
RETURN

The arrow sits half an ATR below the previous low when the oscillator crosses up from below 20.

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

probuilder
// Up arrow when a fast average crosses above a slow one
fast = Average[10](close)
slow = Average[30](close)
IF fast CROSSES OVER slow THEN
    DRAWARROWUP(BarIndex, low) COLOURED(0, 200, 0)
ENDIF
RETURN

Each bullish crossover leaves a green arrow at the bar low.

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

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

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

Common errors and gotchas

  • Indicator only. DRAWARROWUP has no effect in ProScreener, ProOrder or ProBacktest. Keep it in a ProBuilder indicator.
  • Direction is fixed. The arrow always points up. Use DRAWARROWDOWN for a sell 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 low hides the arrow behind the candle. Offset it below the low.