WebCab Technical Analysis Web Services for Delphi v1.1

Stochastics Class

Oscillator's of Stochastic type such as fast %K Stochastic, %D Stochastic and associated trading signals such as Extremum Value, Crossing, Crossing Extreme.

For a list of all members of this type, see Stochastics Members.

System.Object
   Stochastics

public class Stochastics

Remarks

These stochastic indicators compare the most recent observed market variables (price, high, low etc) with the same market variables over a given historical period. Here we provide the (fast) %K Stochastic and its moving average known as the (slow) %D Stochastic.

Within this XML Web service we have implemented the fast %K Stochastic and a general implementation of the %D Stochastic. The generality of the %D Stochastic lies in the fact that the method by which the moving average is evaluated can be selected.

Interpretation and Application

Stochastic Oscillator's produce two time series, %K, and its moving average (MA) usually denoted by %D. These two lines are usual plotted on the same graph since it is generally the interaction of these two indicators which is used in order to generate trading signals.

Below we describe three popular ways in which the Stochastic indicator in interpreted in order to produce trading signals:

  1. Extreme Values - 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.
  2. Crossing - Buy when the Stochastic %K, crosses above the MA %D and sell when the Stochastic %K falls below the MA of Stochastic %D. This will give more trading signals than the above method and is only suitable when the market in trending over the range that you are considering.
  3. Divergence - By searching for any divergences between the price dynamics and the Stochastic indicator %K. The Stochastic will often indicate when a trend is about the change direction (i.e. "its losing steam"). A good example is when the price is making a series of higher highs but the Stochastic is falling to make higher highs.

One Period and Multi Period Versions

For many of the indicators we provide essentially two versions of the same method. The first version evaluates the indicator over the entire period given and the second version evaluates the indicator over all the sub-periods of a given length. Moreover, the version which evaluates over all sub-periods of a given length will return the results as an array where the 1st term of the array will be the value associated with the most recent sub-period, and the previous element corresponding to the previous sub-period and so on.

The naming of these two versions will follow the convention that if the indicator which evaluates over the entire period and returns a single element is named ABCIndicator, then the corresponding indicator over all sub-periods (of a given length) which returns an array will be denoted by ABCIndicatorOverPeriod.

For example, if our source data has N elements then the two versions of a given indicator, where the number of periods used within the sub-periods is n would correspond to:

  1. ABCIndicator - Evaluation of the indicator over the whole period of length N.
  2. ABCIndicatorOverPeriod - Will return an array where the first term is the value of the indicator ABCIndicator on the most recent n periods, and the next term is the value of the indicator ABCIndicator on the previous n+1 periods minus the most recent period and so on. That is, for each iterative evaluation 'the window of evaluation' is shifted one place back.

Requirements

Namespace: Indicators

Assembly: WebCab.DelphiWebServices.TA (in WebCab.DelphiWebServices.TA.dll)

See Also

Stochastics Members | Indicators Namespace