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
DRAWARROWUP(x1, y1) COLOURED(R, G, B, a)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
x1 | integer | required | Bar index where the arrow is drawn. |
y1 | price | required | Price or vertical value where the arrow is placed. |
R, G, B | integer | platform default | Optional COLOURED red, green and blue components, 0 to 255. |
a | integer | 255 | Optional 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)
// 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
RETURNThe 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)
// 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
RETURNEach bullish crossover leaves a green arrow at the bar low.
Example 3, Single arrow on the last bar (Indicator)
// One arrow on the current bar only
DEFPARAM DrawOnLastBarOnly = true
DRAWARROWUP(BarIndex, low) COLOURED(0, 255, 0, 200)
RETURNWith DrawOnLastBarOnly = true, only the current bar carries an arrow.
Common errors and gotchas
- Indicator only.
DRAWARROWUPhas no effect in ProScreener, ProOrder or ProBacktest. Keep it in a ProBuilder indicator. - Direction is fixed. The arrow always points up. Use
DRAWARROWDOWNfor a sell marker orDRAWARROWfor a horizontal one. - X is a bar index. Passing a price into
x1misplaces the arrow horizontally. UseBarIndex. - Overlap with bars. Placing
y1exactly at the low hides the arrow behind the candle. Offset it below the low.
Related instructions
DRAWARROWDOWN, a downward-pointing arrow for sell markers.DRAWARROW, a horizontal right-pointing arrow.DRAWPOINT, a marker point.DRAWTEXT, a text label.COLOURED, sets colour and transparency.BACKGROUNDCOLOR, tints the chart to reinforce a bias alongside arrows.BarIndex, supplies the x coordinate.Average, supplies a moving average to test for crossovers.
