The BollingerUp function in ProBuilder language is used to calculate the upper band of the Bollinger Bands indicator. Bollinger Bands are a popular technical analysis tool developed by John Bollinger, which consists of an upper band, a middle band (simple moving average), and a lower band. The upper Bollinger Band is typically set two standard deviations above the middle band. This indicator is commonly used to measure market volatility and identify overbought or oversold conditions.
BollingerUp[period](price)
Where period specifies the number of bars used for the moving average calculation, and price indicates the price type (e.g., close, open).
// Detecting a last bar piercing the upper Bollinger Band
bollU = BollingerUp[20](close)
IF (Open[1] < bollU[1] AND Close[1] > bollU[1]) THEN
VAR = -1
ELSE
VAR = 0
ENDIF
RETURN VAR as "UPPER PIERCING SIGNAL"
This example demonstrates how to use the BollingerUp function to identify a potential trading signal. The code checks if the previous bar’s open was below the upper Bollinger Band and its close was above it, indicating a possible breakout.
This function is essential for traders who use technical analysis to make informed decisions based on price movements and volatility.