Cluster

Top  Previous  Next

Category: Advanced Indicator Set 1

 

Input parameters

Name

Setting

Default

Time Series

Time Series

Close

High

Real number

100

Low

Real number

0

Number of clusters

Integer >= 2

3

 

Calculations

The Cluster indicator divides the input time series into a pre-specified number of clusters. Before clustering, all input values higher than High are clipped at the High level, and all values lower than Low are clipped at the Low level. The clustering is done uniformly by dividing the whole interval across the Y-axis within the High and Low levels into the Number of cluster intervals.

Clusters are numbered with  increments of +1, but differently depending on the number of clusters.

For an even number of clusters (two, four, six, etc.) the numbering starts with (Number of clusters / 2) and goes up to  +(Number of clusters / 2) bypassing zero. For example, given Number of clusters = 4, clusters are numbered 2, -1, +1, +2.

For an odd number of clusters (three, five, seven, etc.) the numbering starts with Int(Number of clusters / 2) and goes up to +Int(Number of clusters / 2) including zero. For example, given Number of clusters = 5, clusters are numbered 2, 1, 0, +1, +2.

For example, given Cluster(Close, 100, 60, 4), the indicator output is a sequence of 2s, -1s, +1s, and +2s. All Close values between 60 (or lower) and 70 (not including 70) will be marked as cluster -2, Close values between 70 and 80 (not including 80) as cluster -1, values between 80  and 90 (not including 90) as cluster +1, and between 90  and 100 (or higher) as cluster +2.

The Cluster indicator may be helpful in creating an actual output for classification neural networks such as those found in the NeuroShell Classifier or Adaptive Net Indicators (in the latter, only two classes are allowed, so only two clusters should be found).