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
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.
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.
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.
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.
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.
| Condition | Signal | Notes |
|---|---|---|
| Price crosses above upper band | Price moved beyond the upper boundary | A trend may continue or reverse. This event is not a measured probability of either outcome. |
| Price crosses below lower band | Price moved beyond the lower boundary | A lower-band event does not prove oversold prices must rebound. |
| BandWidth falls below a chosen threshold | The bands meet your compression definition | Thresholds depend on symbol and timeframe; there is no universal 4% squeeze. |
| Price crosses the basis | Price changed sides of the central average | Treat this separately from a band touch or a contraction condition. |
Parameters to record and evaluate
Examples describe the configuration, not validated trading settings.
| Parameter | Starting value or requirement | Description |
|---|---|---|
| Length | 20, illustrative starting point | Changing lookback changes the sample used for the average and dispersion. A shorter period does not guarantee narrower bands. |
| Deviation multiplier | 2, illustrative starting point | A wider multiplier moves boundaries farther from the basis for the same dispersion. It does not guarantee that 95% of future prices stay inside. |
| BandWidth threshold | Choose and document | Compare width history on the same instrument and timeframe before setting a threshold. |
| Price comparison | Close or another specified series | A close-based alert can disagree with a visual wick touch without malfunctioning. |
FAQ
Alert Setup FAQ
Do squeeze alerts always require custom Pine code?
Why did a wick touch fail to trigger a close-based alert?
Can a price gap satisfy a crossing rule?
Does a squeeze predict the next move?
How should I evaluate a change to 2.5 deviations?
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