Important note: Recommended Use
Minimum recommended equity USD 500. Best suited for trending markets on 5-minute timeframes. Designed primarily for XAGUSD (Silver) . The EMA and regression slope filters help minimize /suppress signals in in choppy, low-volatility ranging environments.
KNN Machine Learning Hybrid Silver Claude is a fully automated trading robot for cTrader powered by a custom K-Nearest Neighbours (KNN) machine learning engine. Rather than relying on fixed indicator crossovers, it builds a rolling feature space from multi-period RSI and moving-average deviation metrics, applies PCA-style dimensionality compression, and uses Gaussian-kernel-weighted probability voting to assess whether the next price move is more likely bullish or bearish.
What makes it different from a standard indicator bot?
Most bots fire a signal when two lines cross. KNN Nexus fires only when the current market's feature profile closely resembles historical feature profiles that preceded profitable moves ā and the probability weight of those similar past bars exceeds a configurable threshold. This gives the signal a probabilistic, data-driven foundation rather than a deterministic, rule-based one.
Core Feature Set
Machine Learning Core ā Rolling KNN inference with configurable K, window size, and probability threshold. Feature space includes z-scored RSI (3 periods), MA deviation (3 periods), and RSI signal distances, compressed into 3 principal components.
Entry Filters ā Optional EMA trend filter and linear regression slope filter gate every signal. Both are independently toggleable, ensuring you only trade in confirmed trend conditions.
Dynamic Risk Management ā ATR-based initial SL/TP. Optional 3-phase dynamic stop progression: Phase 1 (raw SL) ā Phase 2 (breakeven trigger) ā Phase 3 (Chandelier trailing stop with optional TP removal for open-ended profit capture).
Threat Detection Engine ā Evaluates 4 real-time threat signals per bar: SL proximity, KNN momentum flip, EMA reversal, and regression slope reversal. When a configurable number of threats coincide, it alerts you via Telegram and can automatically tighten the SL to breakeven.
TP Extension ā When strong KNN confidence, EMA alignment, slope alignment, and sufficient price progress all coincide, the take profit is automatically extended by one ATR step. Capped at a configurable maximum number of extensions to prevent unchecked TP chasing.
Tiered Position Sizing ā Lot size grows incrementally as account balance crosses configurable tier thresholds. Hard-capped to preserve long-term equity.
Telegram Intelligence ā Real-time notifications for trade open (with entry logic breakdown), trade close, threat alerts, TP extensions, and a daily P&L summary at GMT+8 midnight.
Default parameters represent a balanced starting point. Users are strongly encouraged to run their own backtests and forward-test on a demo account before committing real capital. Small adjustments to ATR multipliers, probability threshold, and window size can significantly change behavior.
Setup Guide - Work Instructions
Install & Compile
Configure Telegram (optional but recommended)
Create a Telegram bot via @BotFather and obtain your Bot Token. Get your group or channel Chat ID. Paste both into the Telegram Notifications parameter group. Set Enable Telegram Alerts = true.
Choose Your Instrument & Timeframe
Attach the bot to a chart. Recommended starting points: XAGUSD M5. Avoid attaching to very low-liquidity instruments or timeframes below M5.
Set Risk Parameters
Configure Base Lot Size according to your account size. As a guideline, use 0.01 lots per $200ā300 of balance. Enable Tiered Sizing only once you are comfortable with the bot's behavior. Leave the 0.05 lot hard cap in place until you have sufficient live data.
Configure Filters
Keep Strict EMA Trend Filter = true for your first weeks of live trading. Enable Secondary Momentum Filter ā Regression_Slope for additional signal quality. These filters reduce trade frequency but improve signal quality significantly in trending conditions.
ā IMPORTANT RISK DISCLOSURE
Trading foreign exchange, contracts for difference (CFDs), commodities, and other leveraged financial instruments carries a high level of risk and may not be suitable for all investors. The use of automated trading software, including KNN Nexus, does not eliminate this risk and may introduce additional risks including, but not limited to, technical failure, connectivity loss, platform errors, and unexpected market conditions.
KNN Nexus is provided strictly as a software tool. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. The author makes no representations or warranties regarding the profitability, accuracy, or suitability of this robot for any particular purpose or individual circumstance.
Past performance ā whether from backtesting or live forward-testing ā is not indicative of future results. Backtested results are inherently subject to curve-fitting, look-ahead bias, and idealised execution assumptions that may not reflect real-world slippage, spread widening, or broker-specific conditions.
You are solely responsible for all trading decisions made using this software. Never trade with capital you cannot afford to lose. Always test on a demo account before risking real funds. Consult a licensed financial adviser before making any investment decision.
By using KNN Nexus, you acknowledge that you have read and understood this disclaimer and accept full responsibility for any trading outcomes.