WebCab Technical Analysis Web Services for Delphi v1.1

BollingerBands.UpperBollingerBands Method 

Evaluates the position of the Upper Bollinger Band for a given standard deviation level of each sub period for which sufficient data is given.

public double[] UpperBollingerBands(
   double[] prices,
   double standardDeviationLevel,
   int lengthOfMA
);

Parameters

prices
An array of doubles where the k-th term correspond the k-th previous periods price.
standardDeviationLevel
The (positive) number of standard deviations which the lower band in shifted from the moving average.
lengthOfMA
The length of the moving average used within the evaluation of the Bollinger Bands. Note that this also corresponds to the length of the period over which the standard deviation is evaluated.

Return Value

An array where the first term corresponds to the value of the Upper Bollinger Band for the latest periods, the second terms to the previous period and so on.

Exceptions

Exception TypeCondition
ArgumentExceptionThrow if the array historicalPrices is empty or if the number of standard deviations given (i.e. the parameter standardDeviationsLevel) is a negative number.

See Also

BollingerBands Class | Indicators Namespace | UpperBollingerBand(double[], double) - Evaluates the Upper Bollinger Band for a given interval rather than a number of sub-intervals.