YankzWorld
All work
Algorithmic trading2025YankzFX

Multi-strategy forex trading system — ML signals, adaptive risk controls, and a web dashboard

A self-hosted algorithmic trading platform trading 30+ FX pairs live via OANDA — four strategy modes (rules-based, ML, hybrid, auto), XGBoost signal pipeline with 10-indicator feature engineering, EV-gated entry with dynamic spread modelling, a full trade lifecycle manager (breakeven, partial close, trailing stop), five-layer risk controls, economic calendar filtering, real-time Telegram alerts, bar-replay backtesting, and a multi-page React web dashboard with Stripe-backed multi-user billing.

Visit live project
YankzFX — Multi-strategy forex trading system — ML signals, adaptive risk controls, and a web dashboard

The problem

Manual forex trading is error-prone and sleep-dependent. The goal was a fully autonomous system that enhances rule-based signals with machine learning, enforces strict risk gates at every layer, surfaces every decision in real time, and remains configurable without touching production code.

Approach

  • OANDA API integration for live order execution and paper trading simulation across 30+ major, minor, and cross FX pairs with encrypted credential storage and multi-account support
  • Four strategy modes — rules-based (RSI, MACD, ADX, Bollinger Bands), ML (XGBoost, Random Forest, Logistic Regression, MLP with isotonic calibration), hybrid (stack or override modes requiring aligned signals), and auto; model versioning with accuracy, precision, recall, and F1 metrics stored per version
  • ML feature engineering with 10 technical indicators (RSI, MACD, ATR, ADX, EMA 20/50, Bollinger Band position, trend strength); model training from market candles, trade outcomes, and signal audit labels; isotonic probability calibration for reliable confidence estimates
  • EV-gated entry filter — spread plus slippage cost modelling, ATR-based stop/take-profit sizing, breakeven probability calculation, dynamic p-win floor (54% base), and meta-label gate with hard-fail and soft-fail scoring that adjusts position size continuously
  • Full trade lifecycle management — breakeven stop triggered at configurable pip profit, partial close at 14 pips (40% of position), trailing stop activation and subsequent trail logic, and idempotency keys preventing duplicate order submission
  • Five-layer risk management — volatility-adjusted position sizing, maximum concurrent trades and per-pair limits, margin utilisation cap (35% normal / 60% emergency), daily loss limit with cooldown, consecutive loss pause, and correlation exposure monitoring across open positions
  • Economic calendar filtering via Forex Factory feed — high-impact events for the relevant currency pair block new entries; macro feeds track interest rate differentials and commodity correlations
  • Adaptive filter system — real-time ATR volatility gating, session-aware spread caps (per-session p90 percentile), loss-streak detection, equity drawdown monitoring, and confidence dampening under adverse conditions
  • Pair profile learning — per-pair ATR, RSI range, volatility score, win rate, and trend bias updated automatically after each trade close and scoped per bot
  • Bar-replay backtest engine using production signal generation and EV gating, with slippage and spread modelling, equity curve output, and a hot-reload configuration system with 100+ parameters and an admin approval workflow for critical changes
  • React + TypeScript web dashboard with 11+ pages (bot status, live trades, trade history, pair profiles, bot config, strategy settings, admin panel, billing); Prometheus metrics and alert rules with Grafana; Stripe subscription billing with a self-serve plan management portal

Outcome

  • Fully unattended 24/7 operation — risk gates at every layer ensure the system pauses on drawdown, daily loss limit, consecutive losses, or excessive margin before any manual intervention is needed
  • Every trade decision visible in Telegram in real time with confidence score, expected value, P&L, and reason; every parameter change logged with before/after snapshots
  • Backtest engine and hot-reload configuration let strategy parameters be validated and deployed without downtime or production risk

Next case study

Slack-native ephemeral secret sharing with Fernet encryption and full audit log

LEARN Québec · Secure Secret

Got a project that's been waiting too long?

We respond to every inquiry within one business day. No funnels — just a real conversation about whether we're a fit.