Quote:
|
Originally Posted by forexts
What is an LSMA? It stands for Least Squares Moving Average and the indicator plots the endpoint of the linear regression line. By comparing the current value to the prior value a determination is made of a possible trend, ie the linear regression line is pointing up or down.
Use the close of the current candle after it is finished and the next candle is forming as the end point. That avoids the problem of a candle changing the value of the indicator in real time.
|
Is LSMA = Linear Regression? I understand the concept of least squares when fitting an average line, but had not heard it referred as a moving average. I tried this code and got a Linear Regression line that seemed to make the same basic movements as my control (a LR line off of a charting system I pay for). But on the paid version, the peaks of the LR go higher (& lower), often above and below the bollinger bands, while on this version, that effect is much more subdued.
Any ideas why I am seeing this behaviour, or where else I might get an algorithm for LR for MetaQuotes4?