WebCab Technical Analysis Web Services for Delphi v1.1

Filters.AveragePriceOverPeriod Method 

Evaluates the Average Price of an asset over a series of trading periods.

public double[] AveragePriceOverPeriod(
   double[] high,
   double[] low,
   double[] open,
   double[] close
);

Parameters

high
A double array where the first term is the traded high on the most recent period, the second terms is the traded high of the previous periods and so on.
low
A double array where the first term is the traded low on the most recent period, the second terms is the traded low of the previous periods and so on.
open
A double array where the first term is the traded open on the most recent period, the second terms is the traded open of the previous periods and so on.
close
A double array where the first term is the traded close on the most recent period, the second terms is the traded close of the previous periods and so on.

Return Value

A double array where the first term is the average price of the asset on the most recent period considered, the second term is the average price on the period before that and so on.

Remarks

The Average price for a period is just the average of the high, low, open and close of that trading period.

Exceptions

Exception TypeCondition
ArgumentExceptionThrown if the length of the array parameters high and low, open, close are not the same or if any elements of these two array's is strictly negative.

See Also

Filters Class | Indicators Namespace | AveragePrice - evaluates the Average price for a single period.