Moving averages and bands
Oct 12, 2015

The Moving averages and bands indicator provides a multi-layered trend-following framework by combining moving average ribbons, volatility expansion signals, and momentum slope tracking to identify trade entries and exits.
Usage
The Usage section describes how the script can be used to navigate different market environments:
- Trend Identification: The central ribbon, formed by the 10-period Simple Moving Averages (SMA) of high and low prices, acts as a dynamic "fair value" zone. When the price closes above the high SMA, the background turns green, suggesting a bullish shift. Conversely, a close below the low SMA triggers a red background, suggesting a bearish shift or consolidation.
- Volatility Expansion (Top Triangles): The triangles at the top of the chart track the Bollinger Band Width (BBW). Green triangles indicate increasing volatility relative to three bars ago, suggesting a potential breakout or trend acceleration. Red triangles indicate contracting volatility.
- Momentum Exits (Bottom Triangles): The bottom triangles track the slope of a 4-period SMA. These signals help traders manage exits; for example, in a long trade, a shift from green to red bottom triangles may signal fading momentum, providing an early exit signal before a full trend reversal.
- Range Definition: The Bollinger Bands provide outer boundaries for price action, helping to identify overextended conditions or potential mean reversion targets.
Details
The script integrates three distinct technical concepts to provide a comprehensive view of market behavior. The primary ribbon is based on ideas from Tim West’s "Key Hidden Levels," utilizing the high and low averages to create a channel that distinguishes between trending and consolidating price action.
The momentum component uses a short-term 4-period SMA slope, comparing the current value to its value three bars prior to determine the direction of the bottom triangles. Similarly, the volatility component calculates the Bollinger Band Width—the difference between the upper and lower 21-period bands divided by the basis—to determine if the market is entering a "squeeze" or an expansion phase.
Settings
- High MA (Internal): A 10-period SMA of the bar highs used to define the upper boundary of the fair value ribbon.
- Low MA (Internal): A 10-period SMA of the bar lows used to define the lower boundary of the fair value ribbon.
- Momentum Period (Internal): A 4-period SMA used to calculate the slope for the bottom momentum triangles.
- Bollinger Band Length (Internal): A 21-period setting used for both the volatility bands and the bandwidth calculation.
- Bollinger Band Multiplier (Internal): Set to 2.0 standard deviations to define the outer volatility limits.
FAQ
How do I interpret the background colors? The background highlights significant trend shifts. A green background appears when the closing price breaks above the 10-period high SMA, while a red background appears when it breaks below the 10-period low SMA.
What is the difference between the top and bottom triangles? The top triangles represent volatility (Bollinger Band Width) changes, showing whether the market is expanding or contracting. The bottom triangles represent short-term momentum based on the slope of a 4-period moving average.
How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Unlock Unlimited Access to the LuxAlgo Library
Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.
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.

