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
DRAWARROWDOWN(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
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)
// 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
RETURNThe 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)
// 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
RETURNEach bearish crossover leaves a red arrow at the bar high.
Example 3, Single arrow on the last bar (Indicator)
// One arrow on the current bar only
DEFPARAM DrawOnLastBarOnly = true
DRAWARROWDOWN(BarIndex, high) COLOURED(255, 0, 0, 200)
RETURNWith DrawOnLastBarOnly = true, only the current bar carries an arrow.
Common errors and gotchas
- Indicator only.
DRAWARROWDOWNhas no effect in ProScreener, ProOrder or ProBacktest. Keep it in a ProBuilder indicator. - Direction is fixed. The arrow always points down. Use
DRAWARROWUPfor a buy 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 high hides the arrow behind the candle. Offset it above the high.
Related instructions
DRAWARROWUP, an upward-pointing arrow for buy 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.
