doc headers

This commit is contained in:
Miha Kralj
2026-02-27 07:48:12 -08:00
parent 8a1ba95173
commit 4ab3a7fb53
389 changed files with 6682 additions and 468 deletions
+18 -1
View File
@@ -1,5 +1,22 @@
# LSMA: Least Squares Moving Average
| Property | Value |
| ---------------- | -------------------------------- |
| **Category** | Trend (FIR MA) |
| **Inputs** | Source (close) |
| **Parameters** | `period`, `offset` (default 0) |
| **Outputs** | Single series (Lsma) |
| **Output range** | Tracks input |
| **Warmup** | `period` bars |
### TL;DR
- LSMA (Least Squares Moving Average), also known as the Moving Linear Regression or Endpoint Moving Average, calculates the least squares regression...
- Parameterized by `period`, `offset` (default 0).
- Output range: Tracks input.
- Requires `period` bars of warmup before first valid output (IsHot = true).
- Validated against TA-Lib, Skender, and Tulip reference implementations where available.
> "If you want to know where the price is going, draw a line through where it's been. LSMA does this for every single bar, tirelessly fitting linear regressions while you sleep."
LSMA (Least Squares Moving Average), also known as the Moving Linear Regression or Endpoint Moving Average, calculates the least squares regression line for the preceding time periods. In plain English: it finds the "best fit" line for the data window and tells you where that line ends.
@@ -227,4 +244,4 @@ private double GetValidValue(double input)
1. **Overshoot**: Because it projects a trend, LSMA will overshoot significantly when the trend reverses. It assumes the trend continues.
2. **Offset**: You can use a positive offset to extrapolate into the future (forecasting), or a negative offset to center the average.
3. **Noise**: It is very sensitive to outliers because it tries to fit a line to them.
3. **Noise**: It is very sensitive to outliers because it tries to fit a line to them.