Angle of Bollinger Bands Alert
Apr 25, 2021

The Angle of Bollinger Bands Alert indicator calculates the geometric angle of the upper and lower Bollinger Bands to identify potential trend reversals and momentum shifts. This tool provides visual signals on the chart and customizable alerts when specific angular thresholds are met, helping traders catch emerging trends.
Usage
The indicator can be used to identify entry points based on the curvature of the Bollinger Bands.
- Long Signals: A green triangle appears when the price closes above the basis (SMA) and the upper band's angle falls below the user-defined threshold (default 90 degrees).
- Short Signals: A red triangle appears when the price closes below the basis and the lower band's angle exceeds the reciprocal threshold (default 270 degrees).
This script is particularly effective for trend-following strategies where the bands exhibit significant contraction or expansion. It is less suited for low-volatility swing trading where band movements are negligible, as minor fluctuations can trigger signals prematurely.
Details
The calculation utilizes the math.atan function to determine the rate of change between the current band value and the two previous values. The logic is structured so that a "V" shape or "U" turn in the bands is quantified into degrees. For example, a sharp pivot from an upward move to a downward move (or vice versa) results in specific angular outputs that indicate a loss of momentum or a change in direction.
Settings
- Length: Sets the lookback period for the basis Simple Moving Average (SMA) and the Standard Deviation calculation.
- Source: Determines which price data is used for the calculations (default is Close).
- StdDev: The multiplier for the Standard Deviation that determines the width of the Bollinger Bands.
- Offset: Shifts the Bollinger Bands forward or backward on the chart.
- Angle Alert: The primary sensitivity threshold for signals. A value of 90.0 means the script looks for angles sharper than 90 degrees on the upper band or wider than 270 degrees on the lower band.
FAQ
How do I use Angle of Bollinger Bands Alert? You can apply it to your chart and monitor for triangle shapes. Ensure the price is trading relative to the basis line as a filter for the signals.
Can I change the sensitivity of the signals? Yes, by adjusting the "Angle Alert" and the "StdDev" settings, you can filter out noise or make the indicator more responsive to smaller price movements.
How can I access this script? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.