for(i = length; i >= 1 ; i--) //LSMA loop
{
lengthvar = length + 1; & nbsp; //lengthvar = 21
lengthvar /= 3; & nbsp; //lengthvar = 7 nbsp; //lengthvar = 7
tmp = 0; //lengthvar = 21
tmp = ( i - lengthvar)*Close[length-i+shift]; //tmp = 20 - 7 * close[20-i+shift]
sum[1]+=tmp;
}
wt[shift] = sum[1]*6/(length*(length+1));
What is the meaning of this calculation?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
LSMA:
Least Square Moving Average - a moving average calculated by the least squares method.
The indicator has two input parameters:
Calculation:
where
Author: Scriptor