What is LSMA?

LSMA is a least-squares moving average for MT5. It draws a single line on the main chart and uses a price input together with a period to calculate the displayed average.
The package also provides horizontal and vertical shift inputs. These change the position of the displayed line and should be reviewed as chart coordinates rather than treated as a forecast.
How to use LSMA
Compare the LSMA line with recent price movement and with another moving-average length when a second reference is useful. The displayed line can be shifted horizontally or vertically by these inputs.
period controls the smoothing depth, IPC selects the applied price, Shift changes the horizontal bar offset, and PriceShift changes the vertical point offset.
Where it helps
The MT5 package provides a dedicated LSMA calculation rather than a generic moving-average label.
IPC selects the applied price used by the calculation.
Shift and PriceShift expose the horizontal and vertical offsets.
MT5 Indicator Parameters
The table below lists the available MT5 indicator parameters. You can customize these options in the MetaTrader Inputs dialog to match your trading preferences.
| Parameter | Description |
|---|---|
| Period | Sets the smoothing depth used by the LSMA calculation. Default: 50. |
| Applied Price | Selects the applied price used by the indicator. Default: PRICE_CLOSE_. |
| Horizontal Shift | Sets the horizontal shift of the indicator in bars. Default: 0. |
| Vertical Shift | Sets the vertical shift of the indicator in points. Default: 0. |

The screenshot above shows the default input parameters in the MT5 settings window.
How to Install .ex5 Indicator in MetaTrader 5
- Download the ZIP file and extract it.
- In MT5, select File → Open Data Folder.
- Open MQL5 → Indicators and copy the EX5 or MQ5 file into it.
- If the package includes library files, copy them to MQL5 → Libraries. Copy TPL files to the top-level templates folder.
- Restart MT5, find the indicator in the Navigator, and drag it onto a chart.
Test the tool on a demo account first. File contents and required folders can vary between packages.



