[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

El code to identify a cluster of values



PureBytes Links

Trading Reference Links

I calculate many  support & resistance numbers. I draw trend lines for each number. Then I visually identify a cluster of such lines.

Example:

lines at
1212, 1217, 1218.5, 1219.2 1221, 1229
here the numbers between 1217 and 1221 represent a cluster, which gives me the S/R levels.

Is it possible to identify this cluster through a code, and then draw only one best fitting line. If the cluster can be identified then getting the best fit should be simple.

How to identify such a cluster?
Thanks for any help.

Sudarshan Sukhani