Calendar Icon - Evolve Algo
February 11, 2024
Clock Icon - Evolve Algo
7
 min read

Least Squares MA

How to use, trade and calculate the Least Squares Moving Average

Least Squares MA

LSMA

Notes:

These indicators and concepts are specifically designed for TradingView.com

Overview

Least Squares Moving Average (LSMA) is a technical analysis indicator that attempts to identify the trend in the market. It is similar to other moving average indicators, such as Simple Moving Average (SMA) or Exponential Moving Average (EMA), but it uses a different calculation method that aims to reduce the effect of price volatility.

How to Trade

We can use the LSMA like other MA's but here are some steps you can follow to trade using LSMA:

  1. Determine the trend: The LSMA is designed to identify the trend in the market, so the first step is to determine whether the trend is bullish or bearish. You can do this by looking at the direction of the LSMA line, and whether the price is above or below it. If the LSMA is rising and the price is above it, it may indicate a bullish trend. Conversely, if the LSMA is falling and the price is below it, it may indicate a bearish trend.
  2. Identify potential entry and exit points: Once you have determined the trend, you can look for potential entry and exit points based on the LSMA. For example, if the LSMA is rising and the price is above it, you may consider buying when the price dips below the LSMA and then rises again. Similarly, if the LSMA is falling and the price is below it, you may consider selling when the price rises above the LSMA and then falls again.
LSMA

How to Calculate

To calculate the LSMA, first, you need to select a period, such as 10 or 20 days. Then, you need to calculate the sum of the squared differences between the current price and the average price over that period. Finally, you need to divide the sum by the period length and take the square root of the result.

Here is the formula for LSMA:

LSMA = Square Root (Sum[(Price - MA)^2] / Period)

where:

  • Price is the current price
  • MA is the moving average over the selected period
  • Period is the length of the selected period

Latest articles

Browse all