DRAWARROW is a graphical instruction used in the ProBuilder language to draw a horizontal arrow pointing to the right on a chart. This function is primarily used to visually indicate specific points or events on the price chart, such as crossovers or other significant occurrences identified by a trading strategy.
DRAWARROW(x1, y1) COLOURED(R, V, B, a)
Where:
fast = average[10](close)
slow = average[30](close)
// Draw a blue arrow if the fast average crosses over the slow average
if fast crosses over slow then
cross = slow[1]
DRAWARROW(barindex-1, slow[1]) COLOURED(0, 100, 255, 255)
endif
// Draw a semi-transparent purple arrow if fast is greater than slow and slow has not just been crossed
if fast > slow AND slow <> cross then
DRAWARROW(barindex, slow) COLOURED(151, 17, 228, 100)
endif
RETURN
This example uses two moving averages (fast and slow) to determine points on the chart where an arrow should be drawn. The first arrow is blue and appears at the point where the fast moving average crosses over the slow moving average. Subsequent arrows are purple and semi-transparent, drawn whenever the fast average is greater than the slow average, provided the slow average has not just been crossed.