coates moving averages (cma)
Mar 1, 2021

The Coates Moving Averages (CMA) indicator utilizes a specialized ensemble of three moving averages to identify trend direction, market ranges, and high-probability trade zones based on price relation and slope.
Usage
The Usage section describes how the script can be used to identify market regimes and potential entry/exit points:
- Trend Identification: A bullish trend is signaled when the price closes above the 2-period high SMA and the 9-period Least Squares Moving Average (LSMA), provided all averages are sloping upward. Conversely, a bearish trend is confirmed when price closes below the 2-period low SMA and the 9-period LSMA while the averages slope downward.
- Range Detection: A range is signaled when price action produces consecutive closes within the high and low of the previous two candles. In these scenarios, buy zones are established between the lowest low and lowest close of the range, while sell zones are between the highest high and highest close.
- Trade Zones: During an established bull trend, the area between the 2-period low SMA and the 9-period LSMA serves as a buy zone, with the 2-period high SMA acting as a profit target. In a bear trend, the short zone resides between the 2-period high SMA and the 9-period LSMA, targeting the 2-period low SMA.
- CMA Squeeze: When the 2-period high SMA slopes down and the 2-period low SMA slopes up while price remains contained between them, a "squeeze" occurs. This typically precedes volatility and potential breakouts.
- Exhaustion Signals: A trend is considered balanced when the 9-period LSMA remains equidistant between the high and low SMAs. If the LSMA crosses outside these bands, it suggests market exhaustion or imbalance.
Details
The Coates Moving Averages indicator was developed by @Sawcruhteez and is constructed using three primary components: a 2-period Simple Moving Average (SMA) of the Highs, a 2-period SMA of the Lows, and a 9-period Least Squares Moving Average (LSMA).
The script focuses on the geometric relationship between these three lines. Unlike standard moving average crossovers, the CMA emphasizes the angle (slope) of the averages and the position of the close relative to the "channel" created by the high and low SMAs. The LSMA serves as a more reactive baseline, often acting as a filter for trend strength. The logic assumes that for a trend to be sustainable, price must not only break the high/low SMAs but the averages themselves must align in direction.
Settings
- High MA Length: Sets the lookback period for the SMA calculated on price highs (Default: 2).
- Low MA Length: Sets the lookback period for the SMA calculated on price lows (Default: 2).
- LSM Length: Determines the lookback period for the Least Squares Moving Average (Default: 9).
- LSM Source: Defines the price data used to calculate the LSMA, such as Close or HL2 (Default: HL2).
FAQ
How is a breakout distinguished from a trap in this indicator? A trap or shakeout is indicated when a candle wick extends outside the 2-period SMA boundaries but the candle eventually closes inside the range. A valid breakout requires a full candle close outside the high or low SMA.
What are the recommended stop-loss levels for this strategy? Common practice involves using the low of the prior three periods for bullish trends and the high of the prior three periods for bearish trends.
How can I access the Coates Moving Averages (CMA) tool? 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.

