Double AI SuperTrend Strategy Using KNN Trend Estimates
Summary
The document presents an open-source Pine strategy combining two AI-labeled trend estimates with SuperTrend. Its visible settings define two K-nearest-neighbor configurations, each with neighbor and historical data counts, and separate weighted moving average lengths for price and SuperTrend inputs. It also exposes SuperTrend length, ATR multiplier, moving-average type, and a choice of long, short, or both trading directions. The included tooltips explain the general tradeoff between smoothing longer histories and reacting more quickly to recent changes.
The supplied document ends partway through the source, before showing the complete calculations, entry and exit rules, or results. It therefore supports describing the configurable design, but not reconstructing how the two estimates are combined or judging the strategy’s performance. The script header includes commission, slippage, allocation, and capital assumptions, but no strategy report or backtest evidence is provided here. Parameter tuning and validation would be needed to assess signal quality, sensitivity, and live trading behavior.
Key ideas
- The strategy combines SuperTrend inputs with two K-nearest-neighbor configurations.
- Each configuration exposes neighbor counts and historical data lengths.
- Weighted moving averages smooth price and SuperTrend inputs before prediction.
- The settings allow long, short, or both trading directions and adjust SuperTrend sensitivity.
- The source is truncated before the full trading rules and any performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.