TMA Centered Bands Indicator with alerts
Mar 21, 2022

The TMA Centered Bands Indicator tool provides a dynamic volatility envelope based on a centered Triangular Moving Average (TMA) to help traders estimate price extremes and trend direction. It visualizes a central baseline with upper and lower bands calculated using an Average True Range (ATR) offset, offering a smoothed perspective on market fluctuations.
Usage
The indicator is primarily used for identifying potential reversal zones when price interacts with the upper or lower bands.
- Trend Identification: The center line changes color based on the TMA slope (Bullish/Bearish), helping users identify the current momentum.
- Reversal Signals: The script plots upward (▲) and downward (▼) triangles when specific price action occurs near the bands, such as a candle closing back within the bands after a breakout.
- Caution Labels: When the TMA angle is particularly steep, the script can plot caution markers to warn users that a reversal signal might be counter-trend or high-risk.
Details
This script utilizes a "centered" TMA, which means the calculation looks both forward and backward to create a smoother average. Because standard Pine Script cannot look into the future, this indicator uses an offset technique. The most recent bars (the "half period") are drawn using lines that recalculate as new data arrives. This creates a "repainting" effect on the most recent portion of the chart, which is a characteristic of centered moving averages. It is best used for historical analysis and estimation rather than real-time "blind" signal execution.
Settings
Parameters
- Centered TMA half period: Determines the lookback and look-forward period for the TMA calculation.
- Price to use: Selects the price source (Close, Open, High, Low, Median, Typical, Weighted, Average).
- Average true range period: Sets the period for the ATR calculation used to offset the bands.
- Average true range multiplier: Adjusts the width of the bands relative to market volatility.
- Centered TMA angle caution: Sets the sensitivity for the caution labels based on the slope of the TMA.
Colors
- Bear/Bull: Customizes the colors for bearish and bullish trend slopes.
- Bands: Sets the color for the upper and lower envelopes.
- Caution label: Toggles the visibility of caution markers on the chart.
Alerts
- Crossing up/down: Triggers when price moves beyond the bands.
- Coming back: Triggers when price returns inside the bands after an excursion.
- On arrow up/down: Triggers specifically when a reversal triangle is plotted.
FAQ
How do I interpret the dotted lines at the end of the chart?
The dotted lines represent the "centered" portion of the calculation that is subject to change as new price data is received. These are the most current estimates of the bands.
Why do some signals disappear or move?
Because the TMA is centered, it recalculates the most recent bars to maintain smoothness. This tool is designed for estimation and trend analysis rather than static signal generation.
How can I access the TMA Centered Bands Indicator?
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.

