metastock and slope

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.

Good Trading,
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)
linregslope() calculates the gradient and
rsquared() calculates the strength of the trend.

AdBlock Detected

We get it, advertisements are annoying!

But it's thanks to our sponsors that access to Trade2Win remains free for all. By viewing our ads you help us pay our bills, so please support the site and disable your AdBlocker.

I've Disabled AdBlock    No Thanks