AI Trend Navigator (KNN)

Category: trend

An adaptive trend indicator that uses the K-Nearest Neighbors (KNN) algorithm to determine a moving average and trend direction based on historical price pattern similarity.

Formula

\text{Distance}_i = |Value_i - Target_{current}| \\ \text{knnMA} = \frac{1}{K} \sum \text{Values of } K \text{ points with smallest Distance} \\ \text{Trend} = \text{Sign}(\text{Count}(\text{Pos Samples}) - \text{Count}(\text{Neg Samples})) \text{ within local N-nearest neighbors}

Inputs

See signal primitives, usage in published strategies and more on WOBR StrategyVerse.


Open in the WOBR AI app → · WOBR.AI home