AI Trend Navigator [K-Neighbor]
Category: trend
A trend-following tool utilizing a K-Nearest Neighbors (KNN) algorithm to smooth price action and predict trend shifts based on historical proximity in a feature space.
Formula
\begin{cases} \text{knnMA} = \frac{1}{K} \sum_{i=1}^{K} \text{Value}_i \text{ where } i \in \text{nearest neighbors of Target} \\ \text{Price} = \text{avg}(\text{knnMA}, \text{close}) \\ \text{Prediction} = \text{WMA}(\text{KNN\_Classifier}(\text{Price}), 3) \end{cases}
Inputs
- PriceValue (default: hl2)
- maLen (default: 5)
- TargetValue (default: Price Action)
- numberOfClosestValues (default: 3)
- smoothingPeriod (default: 50)
See signal primitives and every published strategy that uses AI Trend Navigator [K-Neighbor] on WOBR StrategyVerse.