Angle of Moving Average
May 5, 2020

The Angle of Moving Average indicator measures the slope of various moving average types to quantify trend strength and momentum transitions. By calculating the trigonometric angle of an average’s trajectory relative to volatility, it helps traders identify when a trend is accelerating, decelerating, or entering a neutral state.
Usage
The Usage section describes how the script can be used to identify trend phases based on the slope of a selected moving average. The indicator outputs a histogram and a line centered around a zero level, where positive values indicate an upward slope and negative values indicate a downward slope.
Traders can use the Angle of Moving Average to:
- Identify Trend Strength: A higher absolute angle value suggests a steeper, more aggressive trend. When the angle crosses above or below the user-defined "Angle Level," it signifies a strong directional move.
- Spot Momentum Shifts: Changes in the angle’s direction (sloping up or down) are reflected in the color of the histogram, providing early warnings of potential trend exhaustion or reversals.
- Filter No-Trade Zones: When the "No Trade Zone" setting is enabled, the indicator highlights periods where the angle is within a specific range, helping traders avoid choppy or sideways markets.
Details
The script calculates the angle by determining the change in the moving average value over a specific lookback period and normalizing it using the Average True Range (ATR). This normalization ensures that the angle calculation remains consistent across different assets and timeframes regardless of price volatility.
The calculation uses the formula:
Angle = arctan((MA - MA[n]) / (ATR * n))
This result is converted from radians to degrees to provide a scale that is easier to interpret. The script supports 12 different moving average types, including standard options like SMA and EMA, as well as more complex calculations like ALMA, McGinley Dynamic, and LSMA.
Settings
- Angle Period: The lookback period used to calculate the change in the moving average value for the angle calculation.
- ATR Period: The lookback period for the Average True Range used to normalize the price change.
- Angle Level: A threshold value used to define strong trends and trigger alerts.
- MA Length: The window size for the underlying moving average calculation.
- MA Type: Selects the calculation method for the average (e.g., SMA, EMA, HMA, ALMA, McGinley).
- MA Source: The price data used for the moving average calculation (e.g., Close, Open, HL2).
- LSMA Offset: Specifies the offset value specifically for the Least Squares Moving Average.
- ALMA Offset/Sigma: Specific parameters to adjust the smoothness and responsiveness of the Arnaud Legoux Moving Average.
- Bar Color: When enabled, the chart bars are colored based on the indicator's trend detection.
- No Trade Zone: When enabled, visually distinguishes between active trending zones and neutral zones based on the Angle Level.
FAQ
How do I interpret the histogram colors? The colors change based on the slope's direction and its position relative to the Angle Level. Typically, a bright color indicates the trend is strengthening in that direction, while a neutral color suggests the angle is weakening or within the "No Trade Zone."
What is the benefit of using ATR in the angle calculation? Using ATR normalizes the vertical movement of the moving average. Without it, the "angle" would vary wildly between a high-priced asset like Bitcoin and a low-priced penny stock, making it difficult to use a consistent Angle Level threshold.
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.
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.

