DBMA - Dual Bollinger Moving Average
Aug 2, 2023

The Dual Bollinger Moving Average indicator combines a customizable moving average with two sets of Bollinger Bands to help traders identify price compression and optimal pullback entry zones.
Usage
The Usage section describes how the script can be used to identify trend entries and manage exits.
- Pullback Entries: This tool helps determine the validity of a pullback by measuring the price distance from the central moving average. Ideally, a pullback entry should occur when the candle low is within the bands (at least within the 1.0 SD far band, or preferably the 0.5 SD near band). If the price is outside these bands, the trend may be overextended for a safe entry.
- Volatility Compression (Squeeze): The indicator uses colored bands to visualize different levels of volatility contraction based on the relationship between Bollinger Bands and Keltner Channels.
- Red: High-compression squeeze.
- Orange: Mid-compression squeeze.
- Yellow: Low-compression squeeze.
- Green: Squeeze has "fired" (volatility is expanding).
- Trailing Stop Management: Traders can use the lower bands as a cushion for trailing stop losses. Instead of exiting immediately upon a close below the moving average, a trader might wait for a close below the far 1.0 SD band to confirm a trend reversal, allowing the trade more room to breathe during minor fluctuations.
Details
The script is based on concepts from John Carter’s TTM Squeeze, specifically identifying periods where Bollinger Bands are enclosed within Keltner Channels. The implementation uses three different ATR multipliers (1.0, 1.5, and 2.0) for the Keltner Channels to differentiate between various levels of price compression. This logic is adapted from the Squeeze Momentum indicator by LazyBear.
The indicator offers three types of central moving averages: Simple Moving Average (SMA), Exponential Moving Average (EMA), and Volume Weighted Moving Average (VWMA). By default, the script calculates two sets of bands at 0.5 and 1.0 standard deviations to create a "ribbon" effect around the central average.
Settings
Moving Average
- MA Length: The lookback period for the central moving average (default is 20).
- MA Type: Selects the calculation method (SMA, EMA, or VWMA).
- MA Source: The price data used for the calculation (typically "Close").
- MA Color/Width: Customizes the visual appearance of the central line.
Bollinger Bands
- Show Upper/Lower Bands: Toggles the visibility of the bands.
- Near Band: Sets the standard deviation for the inner band (default 0.5).
- Far Band: Sets the standard deviation for the outer band (default 1.0).
- Band Colors: Sets the default colors for the bands when the squeeze logic is disabled.
Squeeze
- Squeeze Colors: Toggles the dynamic color-coding of the bands based on volatility compression.
- Squeeze Level Colors: Customizes the specific colors for High, Mid, Low, Fired, and No Squeeze states.
FAQ
How do I interpret the different colors on the bands? The colors indicate volatility levels. Red, orange, and yellow represent varying degrees of compression (squeezes), while green indicates that the squeeze has released and price volatility is expanding. Blue indicates a neutral state with no squeeze detected.
Can I use this for trailing stop losses? Yes. A common method is to use the "Far Band" as an exit trigger. If the price closes outside this band against your trend, it suggests the momentum has shifted significantly enough to warrant an exit.
How can I access the Dual Bollinger Moving Average? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

