DRAWPOINT is a function in ProBuilder language used to visually represent data points on a chart. This function is particularly useful for highlighting specific values or conditions directly on the trading chart, making it easier to visualize patterns or signals.
Syntax:
DRAWPOINT(x, y, size) COLOURED (R, G, B, a) BORDERCOLOR (R, G, B, a)
- x: The Barindex where the point should be drawn.
- y: The price or any other vertical axis value at which the point will appear.
- size (optional): The size of the point, with a maximum value of 5.
- COLOURED (R, G, B, a): Defines the color of the point using RGBA values where R, G, B are the red, green, and blue components (0-255) and ‘a’ is the alpha component (0-100) representing opacity.
- BORDERCOLOR (R, G, B, a): Sets the border color of the point, similar to the ‘COLOURED’ parameter.
Example:
irsi = rsi[14]
if irsi crosses over 50 then
DRAWPOINT(barindex, low, 5) COLOURED(0, 255, 0, 50) BORDERCOLOR(0, 255, 255)
endif
return
In this example, a green point with a cyan border is drawn at the low price of the bar where the 14-period Relative Strength Index (RSI) crosses over the value of 50. This can help traders visually identify when the RSI indicator suggests a potential increase in price momentum.
Additional Information:
- The RSI (Relative Strength Index) is a momentum oscillator used in technical analysis that measures the speed and change of price movements. The RSI oscillates between zero and 100. Traditionally, and according to Wilder, RSI is considered overbought when above 70 and oversold when below 30.
- The Barindex is a unique identifier for each bar on the chart, which helps in pinpointing the exact location horizontally (time-wise) for placing the point.
Using the DRAWPOINT function can significantly enhance chart analysis by providing clear visual cues based on the trading strategy’s criteria.