# metastock and slope

##### 1
I've noticed that the AIQ users make use of the slope function a lot and wondered how to do this in metastock.

There seems to be a formula published on the equis website as follows:

xfunc := Mov(C,25,S);
((Sum(Cum(1) * Xfunc,14) ) - (Sum(Cum(1),14) * Sum(Xfunc,14) / 14) ) / ( (Sum(Power(Cum(1),2),14) ) - (Power(Sum(Cum(1),14),2) / 14) );

this gives the slope of the last 14 days of the function xfunc (in this case a 25 day simple moving average).
Although the formula looks quite complicated you can just use cut and paste.

My first impressions are that it works quite well.

Darth.

after some more research it seems that there are some standard formulae in this area based on a linear regression analysis. (I thought i recognized the above formula).

linearreg() calculates the linear regression indicator (last value on the line)
rsquared() calculates the strength of the trend.

Darth.

Anyone have a converter for metastock formula to Excel?
Can anyone advise on how to render the MSROC in Excel?

Replies
0
Views
4K
Replies
4
Views
5K
Replies
0
Views
2K
Replies
0
Views
3K
Replies
2
Views
3K