Tuesday, April 12, 2011

Indicator Slope of line

Indicator Slope of line
The following custom formula returns the slope of the line. For example, this formula returns the slope of the 14 days run to close the price of security is.
((14 * (Sum (Cum (1) * C, 14))) - (Sum (Cum (1), 14) * (Sum (C, 14)))) / ((14 * Sum (Pwr (Cum (1), 2), 14)) - Pwr (Sum (Cum (1), 14), 2))
To apply the different lines that will replace C with the desired syntax for the line. For example, the slope of 25 period simple moving average would be:

((Sum (Cum (1) * Mov (C, 25 C), 14)) - (Sum (Cum (1), 14) * Sum (Mov (C, 25 C), 14) / 14)) / ((Sum (Power (Cum (1), 2), 14)) - (Power (Sum (Cum (1), 14), 2) / 14))
You can also make this universal formula using the variable Q. You can then plot the formula on top of each line.
((14 * (Sum (Cum (1) * P, 14))) - Sum (Cum (1), 14) * (Sum (P, 14))) / ((14 * Sum (Pwr (Cum (1 ), 2), 14))-Pwr (Sum (Cum (1), 14), 2))

No comments:

Post a Comment

Powered by Blogger.