All indicators

LAGging span leaves Bollinger Bands strategy

Feb 5, 2021

Static chart image
SignalsMoving AveragesVolatility

The LAGging span leaves Bollinger Bands strategy indicator provides a unique trend-following system that identifies potential breakout and continuation signals by comparing current price action to historical Bollinger Band levels. By shifting the Bollinger Bands forward, the tool effectively simulates a lagging span interaction, allowing traders to visualize how current prices relate to past volatility regimes.

Usage

The script is primarily used to identify momentum shifts and trend continuations. When the current price crosses above the historical upper Bollinger Band (shifted forward by the offset), it generates a long entry signal. Conversely, a cross below the historical lower band suggests a short entry.

  • Trend Following: Use the signals to enter trades when price "breaks out" of the historical volatility range, suggesting a new trend leg is forming.
  • Volitility Context: By looking at the bands from a specific number of periods ago, traders can determine if the current price movement is significant relative to the market's previous state.
  • Risk Management: The strategy implementation includes stop-loss logic based on the opposite band, helping to define risk based on current volatility.

Details

This tool utilizes the concept of the "Lagging Span" (Chikou Span) from the Ichimoku Cloud system but applies it to Bollinger Bands. Instead of plotting a separate line lagging behind the price, this script shifts the calculation of the Bollinger Bands forward on the chart.

Technically, the script:

  1. Calculates a standard Simple Moving Average (SMA) and Standard Deviation.
  2. Constructs upper and lower bands based on a user-defined multiplier.
  3. Projects these bands into the future by the specified "Offset" value.
  4. Evaluates the current price against these projected values to determine if the "lagging price" has exited the historical volatility envelope.

Settings

  • Source: Determines the price data used for the Bollinger Band calculations (e.g., Close, HL2, OHLC4).
  • Length: The lookback period for the Moving Average and Standard Deviation calculation.
  • Multiplier: The number of standard deviations away from the basis line for the upper and lower bands.
  • Offset: The number of bars the Bollinger Bands are shifted forward (representing the "lag" of the price span).

FAQ

How do I interpret the signals?

A buy signal occurs when the current price crosses above the upper band of the shifted Bollinger Bands. A sell signal occurs when the price crosses below the lower band of the shifted Bollinger Bands.

What is the advantage of shifting the bands forward?

Shifting the bands forward allows you to see exactly where the current price stands in relation to the Bollinger Band values from X periods ago without needing to plot an additional lagging line, keeping the chart cleaner.

How can I access this tool?

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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.