WebCab Technical Analysis for COM v1.1

Momentum.MomentumPctPeriod Method 

We calculate the momentum percentage over a given period.

public double[] MomentumPctPeriod(
   double[] prices,
   int noOfPeriods
);

Parameters

prices
An array of length equal to the number of periods considered in the indicator evaluation where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
noOfPeriods
The number of periods before to which the closing price is compared.

Return Value

A double array where the first term is the momentum percentage for the most recent trading period, the second term is the momentum percentage for the previous trading period and so on.

Remarks

This is a generalization of the momnetumPct method. Instead of taking into account only one value of the closing price we calculate the momentum percentage over a entire period.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown if prices array has strictly negative elements or if the noOfPeriods argument is greater then the length of prices array.

See Also

Momentum Class | WebCab.COM.Finance.Trading.Indicators Namespace