BollingerDown
BollingerDown in ProBuilder returns the lower Bollinger Band, a simple moving average minus two standard deviations. Syntax, formula, examples, and gotchas.
Syntax
BollingerDown[N](price)Parameters
| Name | Type | Default | Description |
|---|---|---|---|
N | integer | 20 | Lookback period used for both the moving average and the standard deviation. 20 is the conventional setting. |
price | price source | close | The series the band is computed on. Accepts close, open, high, low, typicalprice, or any custom variable. |
Formula
BollingerDown = Average[N](price) - 2 * STD[N](price)The middle band is the N-period simple moving average. The lower band sits two sample standard deviations below it. The multiplier is fixed at 2; other multipliers require combining Average and STD manually.
How it works
Each bar, ProBuilder averages the last N values of price and measures their standard deviation, then subtracts twice that deviation from the average. The result is a floor that adapts to volatility: it drops away from the average when the market becomes turbulent and tightens toward it when the market goes quiet.
The statistical premise is that most observations cluster within two standard deviations of their mean, so a close beneath the lower band marks price as unusually depressed relative to its own recent history. Markets are not normally distributed, and downside moves in particular tend to produce fat tails, so closes below the band occur more often than the theory suggests.
BollingerDown returns only the lower band. BollingerUp supplies the upper band, Average[N](price) the middle band, and BollingerBandWidth the spread between them.
Examples
Example 1, Detecting a pierce of the lower band (Indicator)
// Flag a bar that opened above the lower band and closed below it
bollD = BollingerDown[20](close)
VAR = 0
if(Open[1] > bollD[1] AND Close[1] < bollD[1]) THEN
VAR = 1
ENDIF
RETURN VAR // 1 signals a downward pierce of the lower bandChecks the previous bar: an open above the band followed by a close below it indicates a sharp downward push through the lower boundary, often accompanied by a volatility spike.
Example 2, Mean-reversion buy at the lower band (ProOrder)
// Buy closes below the lower band, but only above the long-term trend
lower = BollingerDown[20](close)
basis = Average[20](close)
trend = Average[200](close)
IF NOT LongOnMarket THEN
IF close > trend AND close < lower THEN
BUY 1 CONTRACT AT MARKET
ENDIF
ELSE
IF close >= basis THEN
SELL AT MARKET
ENDIF
ENDIFA classic band mean-reversion pattern. The 200-period average filters out entries in downtrends, and the position exits when price recovers to the middle band.
Example 3, Scanning for oversold closes (ProScreener)
// List instruments closing below their lower Bollinger Band
lower = BollingerDown[20](close)
stretch = (lower - close) / lower * 100
SCREENER[close < lower](stretch AS "% below band")Returns every instrument whose latest close sits under the lower band, ranked by the size of the excursion.
Interpretation
| Situation | Common reading |
|---|---|
| Close touches or breaks the band | Price is statistically stretched to the downside. In ranging markets this often precedes a bounce toward the middle band. |
| Price rides along the band | A persistent downtrend, walking the band. Buying each touch is unreliable. |
| Band flattens and narrows | Volatility contraction, sometimes called a squeeze, which often precedes a directional expansion. |
A close below the lower band identifies a statistically unusual price, not a buy signal by itself. It is usually combined with a trend filter or a momentum confirmation.
Common errors and gotchas
- Wrong bracket type.
BollingerDown(20, close)raises a syntax error. Period in square brackets, price source in parentheses:BollingerDown[20](close). - Buying every band touch. In sustained downtrends price can close below the band for many bars in a row. Mean-reversion entries need a trend or momentum filter to survive out of sample.
- Fixed multiplier. The 2-deviation offset cannot be changed through the function. For a wider or tighter band, compute
Average[N](price) - m * STD[N](price)directly. - Normality assumption. The two-deviation floor rests on a bell-curve model of returns. Crash conditions violate it, so the band offers no hard guarantee of support.
Related instructions
BollingerUp, the matching upper band.BollingerBandWidth, distance between the two bands, a volatility gauge.STD, standard deviation, the building block for custom multipliers.Average, the middle band and general-purpose moving average.KeltnerBandDown, ATR-based alternative lower envelope.KeltnerBandUp, ATR-based upper envelope.DonchianChannelDown, lowest-low channel, a non-statistical envelope.RSI, bounded oscillator often paired with band touches for confirmation.
