AI Trend Navigator [K-Neighbor]
Category: trend, momentum
A trend indicator that uses a K-Nearest Neighbors (KNN) algorithm to smooth price action and predict trend direction by comparing current price states to historical neighbors.
Formula
KNN\_MA = \frac{1}{k} \sum_{i=1}^{k} \text{NearestNeighbors}(ValueIn, TargetIn) \\ \text{Prediction} = \text{WMA}(\text{KNN}(Price, \text{History}_{10}), 3)
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.