Extra indicators
LSMA: Least Squares Moving Average
The end point of the straight line that fits the last N closes best: a moving average that follows the slope.
用通俗的话解释
Instead of averaging, LSMA fits a straight line through the recent closes (linear regression) and takes where that line ends today. In a steady trend it sits almost on the price.
计算方法
For the last N closes, find the line a + b·k with the smallest squared distances (least squares) and plot its value at the newest candle.
b = (N Σk·y − Σk Σy) ÷ (N Σk² − (Σk)²), a = (Σy − b Σk) ÷ N
LSMA = a + b × (N − 1)如何使用
- As a responsive trend line.
- The slope (rising or falling) shows the direction of the last N candles.
得出结论
- When the price moves far away from LSMA the trend is accelerating; returning to it means it is fading.
示例
EURUSD H1, LSMA(25): during a steady climb the line almost touches every close; the first close well below it signals the climb has broken.
示例中的价格仅作说明。
注意事项
- It reacts fast and therefore overshoots at turning points.
一点历史
Linear regression goes back to Legendre and Gauss (early 1800s); traders adopted the rolling version in the 1980s and 1990s.
仅供学习参考。 没有任何指标或形态能预测未来,本页内容均不构成投资建议。