|
WebCab Technical Analysis (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Within this Enterprise JavaBean we offer procedures which evaluate the upper and lower Bollinger Bands.
Bollinger Bands are a type of envelope that are plotted at standard deviation levels above and below the corresponding moving average. This produces an effect of having the bands widen during periods of higher volatility and contract during less volatile periods. Bollinger Bands indicate the relative supply and demand for a given asset. If the asset to move close to the top of the envelope then it indicates that there is strong demand for the asset, conversely if the asset hugs the bottom of the trading range then it indicates that there is oversupply of the asset.
Since the Bollinger Bands will nearly always be combined with other indicators when forming a trading system the number of periods used in the evaluation of the standard deviation of the stocks and the moving average will vary. For those without design restrictions a popular choice of the number of time periods is around 20-23.
| Method Summary | |
double |
bollingerBandsHigher(double[] historicalPrices,
double standardDeviationLevel)
Evaluates the position of the Upper Bollinger Band for a given standard deviation level. |
double |
bollingerBandsLower(double[] historicalPrices,
double standardDeviationLevel)
Evaluates the position of the Lower Bollinger Band for a given standard deviation level. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double bollingerBandsLower(double[] historicalPrices,
double standardDeviationLevel)
throws RemoteException
historicalPrices - an array of doubles where the first term correspond the latest periods price and the previous element is the value of the element before that and so on... The length of this array is equal to the number of periods used in the evaluation of the standard deviation and the moving average.standardDeviationLevel - the number of standard deviation which the lower band in shifted from the moving average
IllegalArgumentException - thrown when the historicaPrices array
in empty or the number of standard deviations considered (i.e. the
parameters standardDeviationLevel) is not positive number.
RemoteException
public double bollingerBandsHigher(double[] historicalPrices,
double standardDeviationLevel)
throws RemoteException
historicalPrices - an array of doubles where the first term correspond the latest periods price and the previous element is the value of the element before that and so on... The length of this array is equal to the number of periods used in the evaluation of the standard deviation.standardDeviationLevel - the (positive) number of standard deviations which the lower band in shifted from the moving average.
IllegalArgumentException - throw if the array historicalPrices is
empty or if the number of standard deviations given (i.e. the parameter
standardDeviationsLevel) is a negative number.
RemoteException
|
WebCab Technical Analysis (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||