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. 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.
I removed the LSMA from my chart I am trading using the indicator CCI almost exclusively What struck me strange about the LSMA is that I had not read that LR is a MA calculation, although I do understand the concept of an algorithm to find a line that matches a 2 dimensional set of points best using the least squares method. I'd never seen indicator lines plotted in 3 colours. I am not a programmer Thanks for the link. Would you mind giving me an explanation of what parameters you use and what you are looking for -it looks promising.
I have failed at many things until I got to know the indicator well enough and most of what I do is probably hard to define and also wrong in many people's eyes. I guess I progressed the most by practise trading for a gazillion hours As far as i know it isn't a default MA built into MT4. To add comments, please log in or register. I found that the extra indicators were a bit confusing Also, it is a task I need to complete for others.
Thank you all, -Derk. I use a tight stopMore...