Alert Setup Guide

How to Set Bollinger Bands Alerts: Crosses and BandWidth

Configure price-versus-band and BandWidth alerts, distinguish crosses from touches, and verify alert delivery using current market data.

Setup Steps

1

Configure the band calculation

Add the built-in Bollinger Bands indicator. Record the basis type, length, source, deviation multiplier and timeframe. Length 20 and multiplier 2 are common starting settings, not an optimized strategy. Keep any visual offset at zero when first checking alert alignment.

2

Choose a specific band and comparison

Open Create Alert and choose the intended price series and Bollinger band plot. Select the upper, lower or basis line explicitly and choose the crossing direction. Read both operands: price crossing above a band is different from the band crossing above price. A wick touch and a close crossing are also different events.

3

Use BandWidth for a numerical squeeze rule

Add the built-in Bollinger BandWidth indicator if your rule concerns narrow bands. Select its width plot and a threshold chosen from the instrument’s history. Its percentage formula is band width divided by the basis, multiplied by 100. A condition combining compression with a later breakout needs an explicit sequence rule; a low width alone has no direction.

4

Save the alert context

Choose the frequency, expiry and notification method in your account. For a rule defined on completed candles, select Once Per Bar Close where available. Record the symbol, timeframe and inputs. Recreate the alert after changing the script or its inputs; the running alert retains its saved configuration.

5

Verify delivery on new market data

Treat chart inspection and delivery as separate checks. Bar Replay can help inspect historical plots, but server alerts continue using live data. Check a new event against the alert log, then check the chosen notification channel. This is a test procedure, not a claim that delivery or investment performance has been tested here.

Alert Conditions Reference

Conditions to define and verify for the selected indicator.

Feature comparison table: Signal vs Notes
ConditionSignalNotes
Price crosses above upper bandPrice moved beyond the upper boundaryA trend may continue or reverse. This event is not a measured probability of either outcome.
Price crosses below lower bandPrice moved beyond the lower boundaryA lower-band event does not prove oversold prices must rebound.
BandWidth falls below a chosen thresholdThe bands meet your compression definitionThresholds depend on symbol and timeframe; there is no universal 4% squeeze.
Price crosses the basisPrice changed sides of the central averageTreat this separately from a band touch or a contraction condition.

Parameters to record and evaluate

Examples describe the configuration, not validated trading settings.

Feature comparison table: Starting value or requirement vs Description
ParameterStarting value or requirementDescription
Length20, illustrative starting pointChanging lookback changes the sample used for the average and dispersion. A shorter period does not guarantee narrower bands.
Deviation multiplier2, illustrative starting pointA wider multiplier moves boundaries farther from the basis for the same dispersion. It does not guarantee that 95% of future prices stay inside.
BandWidth thresholdChoose and documentCompare width history on the same instrument and timeframe before setting a threshold.
Price comparisonClose or another specified seriesA close-based alert can disagree with a visual wick touch without malfunctioning.

FAQ

Alert Setup FAQ

Do squeeze alerts always require custom Pine code?
No. A simple threshold on the built-in Bollinger BandWidth plot may be enough. A custom sequence, percentile definition or combination with other conditions needs a rule that implements that exact logic.
Why did a wick touch fail to trigger a close-based alert?
The candle’s high can touch a band while its close remains below it. Confirm the selected price source, crossing direction and frequency rather than assuming any visible touch must trigger.
Can a price gap satisfy a crossing rule?
Yes, a move from one side of a level or series to the other can satisfy a crossing condition without trading at every intervening price. Check the compared samples and alert timing; gaps are not a blanket reason for a cross to be ignored.
Does a squeeze predict the next move?
It describes relative compression under the chosen rule. It does not establish direction, timing or a profitable breakout.
How should I evaluate a change to 2.5 deviations?
Keep other inputs fixed and record the changed event count and outcomes on a reserved sample. Fewer alerts alone do not establish better signal quality.

Need a custom alert rule?

Describe the condition in Pineify’s coding agent, then review the generated Pine Script and test its timing and delivery in TradingView.

Explore Pine Script coding