|
WebCab Technical Analysis (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Local interface of Stochastics. This interface provides the same functionality as the Stochastics remote interface.
Stochastics| Method Summary | |
int |
crossingSignal(double firstStochasticLast,
double firstStochasticPrevious,
double secondStochasticLast,
double secondStochasticPrevious)
Method crossingSignal(double, double, double, double) as defined in the Stochastics remote interface. |
double |
dStochastic(double[] stochastic,
int method)
Method dStochastic(double[], int) as defined in the Stochastics remote interface. |
int |
extremeValueSignal(double extremeLow,
double extremeHigh,
double lastStochastic,
double previousStochastic)
Method extremeValueSignal(double, double, double, double) as defined in the Stochastics remote interface. |
double |
kFastStochastic(double[] high,
double[] low,
double close)
Method kFastStochastic(double[], double[], double) as defined in the Stochastics remote interface. |
| Methods inherited from interface javax.ejb.EJBLocalObject |
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double kFastStochastic(double[] high,
double[] low,
double close)
Description copied from the Stochastics interface:
Evaluation of the Fast %K Stochastic.
Indicator variables
The Stochastic %K depends on the following variable:
Within this method these parameters are set indirectly by the length of the array's which are passed to the method. That is, if the array's have length 5, then the fast Stochastic is evaluated over the last 5 trading period, referred to as the 5-day %K Stochastic.
Now the formulae for the Stochastic %K is:
where the "lowest low" (respec. "highest high") is the highest (respec. lowest) close of the asset over the period under consideration. Since the "Last close", will lie between the highest high and lowest low this indicator will lie between 0 and 100.
high - an array of trading highs during the previous trading sessions. The length of this array corresponds to the number of periods over which the %K Stochastic is evaluated.low - an array of trading lows during the previous trading sessions. The length of this array corresponds to the number of periods over which the %K Stochastic is evaluated.close - the close price of the assetStochastics.kFastStochastic(double[], double[], double)
public double dStochastic(double[] stochastic,
int method)
throws ReferencedServiceException
Description copied from the Stochastics interface:
Evaluate the (general) %D Stochastic. This is just the moving average of the (fast) %K Stochastic. When the simple moving average is used and the moving average is take over three days, the resulting indicator to referred to as the (slow) %K Stochastic.
As one would expect the Moving Average %D of the %K Stochastic depends on:
Remark When the simple moving average is used and it is evaluated over 3-days, then the %D Stochastic reduces to what is known as the slow %K Stochastic.
stochastic - the value of the stochastic over the period consideredmethod - determines the methods used for the evaluation of the moving average in accordance with the following key: For further details concerning the definition of these moving averages please see the accompanying PDF documentation or the API documentation for MovingAverage.
ReferencedServiceExceptionStochastics.dStochastic(double[], int)
public int extremeValueSignal(double extremeLow,
double extremeHigh,
double lastStochastic,
double previousStochastic)
Description copied from the Stochastics interface:
Implements a general framework for producing extreme value trading signals in accordance with the follow. Note, that the general ides of this approach is to seek points which are oversold or over brought levels which are turning.
Methodology
Buy when the Oscillator (either the Stochastic %K or its moving average %D) falls below a specific level (e.g., 20) and then rises above that level. Sell when the Oscillator rises above a specific level (e.g., 80) and then falls below that level. This approach is the preferred method of the Stochastics original creator George Lane.
extremeLow - this is the level at which the Stochastic is believed to indicate an oversold level. The Stochastic always lies between 0 and 100, and a suggested extreme low value to take is 20.extremeHigh - this is the level at which the Stochastic is believed to indicate an over brought level. The Stochastic always lies between 0 and 100, and a suggested extreme high value is 80.lastStochastic - - This is the last value of the Stochastic (either %K or %D).previousStochastic - - This is the previous value of the Stochastic (either %K or %D)
Stochastics.extremeValueSignal(double, double, double, double)
public int crossingSignal(double firstStochasticLast,
double firstStochasticPrevious,
double secondStochasticLast,
double secondStochasticPrevious)
Description copied from the Stochastics interface:
Implements a general framework for producing trading signals based on the crossing of two Stochastics.
Methodology
Buy when the Stochastic %K, crosses above the MA %D and sell when the Stochastic %K falls below the MA of Stochastic %D. Since this approach is prone to being whip-sawed we use two (general) Stochastics so that a MA of the %K Stochastic of the first Stochastic and an even more smoothed second Stochastic. In this case a sell signal is generated if the first (more sensitive) Stochastic cross below the second (smoothed) Stochastic, and a buy signal is generated if the first Stochastic crosses above the second Stochastic.
firstStochasticLast - - The last value of the first Stochastic. Where the first Stochastic is either the (fast) %K Stochastic or a smoothed moving average of this indicator.firstStochasticPrevious - - The previous value of the first Stochastic.secondStochasticLast - - The last value of the second Stochastic.secondStochasticPrevious - - The previous value of the second Stochastic is a moving average of the first stochastic.
Stochastics.crossingSignal(double, double, double, double)
|
WebCab Technical Analysis (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||