dotnetCHARTING Send comments on this topic.
UpperBollingerBands(SeriesCollection,Double,Int32) Method
See Also 
dotnetCHARTING Namespace > StatisticalEngine Class > UpperBollingerBands Method : UpperBollingerBands(SeriesCollection,Double,Int32) Method


sc
A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
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.
Evaluates the position of the Upper Bollinger Band for a given standard deviation level.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function UpperBollingerBands( _
   ByVal sc As SeriesCollection, _
   ByVal standardDeviationLevel As Double, _
   ByVal lengthOfMA As Integer _
) As SeriesCollection
Visual Basic (Usage)Copy Code
Dim sc As SeriesCollection
Dim standardDeviationLevel As Double
Dim lengthOfMA As Integer
Dim value As SeriesCollection
 
value = StatisticalEngine.UpperBollingerBands(sc, standardDeviationLevel, lengthOfMA)
C# 
public static SeriesCollection UpperBollingerBands( 
   SeriesCollection sc,
   double standardDeviationLevel,
   int lengthOfMA
)

Parameters

sc
A collection of series objects. For example, to evaluate this indicator for two series you will need to pass a series collection containing this two series.
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

A series 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

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

Remarks

Please note that by standard deviation level we not only refer to the number of standard deviations shifts away from the moving average at which the Higher Bollinger Band is drawn but also the number of time series points which are used in the evaluation of the standard deviation and the moving average.

See Also

© 2021 All Rights Reserved.