BFR Trading System — Live Deployment Roadmap

From Backtest
to Live Bot.

A complete implementation plan covering VPS setup, live data integration, signal generation, order execution, and monitoring — built on top of the validated BFR strategy backtester already developed.

Backtesting Complete
Planning Phase (Now)
Bot Build — Upcoming

What We've Already Built

The foundation is complete. The BFR backtester is a fully validated Python system with all strategy logic, data pipelines, and performance reporting already in place.

🧠
Strategy Engine
Full BFR signal generation in Python. FVG detection, sweep identification, volume zone formation, 3m entry refinement, SL/TP calculation — all validated and working.
✓ Complete
📊
5-Year Backtest
Validated across 5 instruments (ES, NQ, GC, 6E, 6B), 6 configurations, 5 years (2020–2024). ~82% avg WR, +7,404R combined, 82.9 trades/month. COVID, bear and bull regimes tested.
✓ Complete
🗄️
Data Pipeline
Databento API integrated for historical data. Twelve Data connected as secondary source. Local parquet cache system implemented — all instruments cached, no repeat API calls.
✓ Complete
⚙️
Configuration System
Per-instrument parameter configs (ES, NQ, GC, 6E, 6B) with RR ratios, ATR buffers, zone sizes, session rules, regime filters — all tunable from one config file.
✓ Complete
📋
Trade Logging & Reports
Full trade log CSV, equity curve PNG, session breakdown, win rate by instrument, skip reason analysis. Monthly and yearly performance reports automated.
✓ Complete
🔌
Broker Integration
Not yet built. The backtester runs in isolation — no live order placement exists. This is the main component to build next: connecting signal output to IB paper account execution.
→ To Build
Full System Architecture — Planned End State
📡
Databento
Live CME Feed
Done
🧠
Signal Engine
BFR Strategy
Done
⚖️
Risk Manager
Size + Checks
To Build
🏦
IB Gateway
Paper Account
To Build
📱
Dashboard
Streamlit + TG
To Build

Tools & Infrastructure

Every component chosen for reliability, Python compatibility, and cost efficiency. Total monthly cost for demo phase: $10.

Component Tool Purpose Cost
Server
Namecheap VPS
2 CPU · 2GB RAM · 40GB SSD · Buffalo NY
Runs the bot 24/7 without your laptop. Buffalo NY location is closest to CME Chicago and IB New York servers — lowest latency available on this budget.
$10/month
Operating System
Ubuntu 22.04 LTS Server
Lightweight server OS. No desktop GUI wasted. Uses only ~150MB RAM leaving maximum headroom for the bot. Industry standard for trading servers.
Free
Live Market Data
Databento Streaming API
Already integrated ✓
Real CME exchange volume — critical for volume engulfing zone detection. The same API used in backtesting, now streaming live bars instead of historical arrays.
Already paying
Strategy Engine
Python 3.11 (existing codebase)
Already built ✓
The full BFR backtester code. Signal generation logic is ported from historical array processing to live streaming bar processing — same logic, different data delivery.
Free
Broker Connection
IB Gateway + ib_insync
pip install ib_insync
IB Gateway is the lightweight server version of TWS — uses ~100MB RAM vs 300MB for full TWS. ib_insync is a clean async Python wrapper for the IB API. Places bracket orders with SL and TP attached.
Free
Paper Account
Interactive Brokers Paper
Free with any IB account
$1M virtual capital. Real market fills at real prices. Full API access identical to live trading. ES, NQ, GC, 6E, 6B all available. No deposit required for paper account.
$0
Live Dashboard
Streamlit
pip install streamlit
Python-native web dashboard. Shows live P&L, open positions, signals taken/skipped, running win rate, equity curve. Accessible from any browser on any device.
Free
Team Alerts
Telegram Bot API
pip install python-telegram-bot
Instant push notifications to all team members' phones. Fires on: new signal detected, trade opened, trade closed (win/loss/BE), daily summary, any errors. Fully configurable.
Free
Process Manager
systemd or screen/tmux
Keeps the bot running if SSH disconnects. Auto-restarts the bot if it crashes. Starts automatically on VPS reboot. Standard Linux server tooling.
Built into Ubuntu
$10
Per Month Total
VPS only. Everything else free during demo.
$0
Broker Cost
IB paper account. No deposit. No fees.
$0
Capital at Risk
Demo phase. $1M virtual. Real prices.
5
Instruments
ES · NQ · GC · 6E · 6B simultaneously.

Step-by-Step Build Plan

Six sequential phases from VPS purchase to live trading. Each phase must be validated before moving to the next. No code is written until planning is signed off.

Phase 01
VPS Setup & Environment
Week 1 · ~2-3 days
Next Step
Infrastructure Setup — No code, just server config
  • Purchase Namecheap VPS $10/month plan
    2 CPU · 2GB RAM · 40GB SSD · Choose Buffalo, NY location. Select Ubuntu 22.04 LTS Server as operating system. Note down IP address and root credentials.
    $10
  • Connect via SSH and secure the server
    SSH into VPS using root credentials. Create a non-root user. Set up SSH key authentication. Disable password login. Enable firewall (ufw). Update all packages.
    VPS
  • Install Python 3.11 and all dependencies
    Install Python, pip, git. Install all required packages: ib_insync, databento, streamlit, pandas, numpy, python-telegram-bot, schedule, pytz. Verify all imports work.
    Python
  • Install IB Gateway (not TWS)
    Download IB Gateway installer. Run in headless mode on the server. Configure for paper trading account. Enable API connections on port 4002. Test connectivity from Python.
    IB
  • Upload backtester codebase to VPS
    Use git or scp to copy all existing Python files, config files, and cached data to the VPS. Verify the existing backtester runs correctly on the server environment before touching any live code.
    Python
  • Set up process management with systemd
    Create systemd service files so the bot auto-starts on server reboot. Set up tmux sessions for interactive monitoring. Configure log rotation so disk doesn't fill up over time.
    VPS
Phase 02
IB Paper Account & Connectivity
Week 1-2 · ~3 days
Next Step
Broker Connection — Test before any strategy code
  • Open Interactive Brokers account
    Go to interactivebrokers.com. Open an individual account (free). Paper trading account is included at no cost. No minimum deposit required for paper account access.
    Free
  • Configure IB Gateway for API access
    Log into IB Gateway with paper account credentials. Enable socket client connections. Set port to 4002. Allow connections from localhost only. Test with a simple Python ping script.
    IB
  • Test ib_insync connection and instrument lookup
    Write a minimal Python script using ib_insync. Connect to IB Gateway. Look up ES, NQ, GC, 6E, 6B contract definitions. Confirm all 5 instruments are accessible on the paper account.
    Python
  • Test manual order placement via API
    Place a test bracket order on ES paper account. Confirm: entry fills at market price, SL placed correctly, TP placed correctly. Cancel the test order. Verify position monitoring works.
    IB
  • Test disconnection and reconnection handling
    Deliberately disconnect IB Gateway mid-session. Confirm the Python code detects the disconnection, waits, and auto-reconnects. Critical for VPS reliability — this must work before going further.
    Python
Phase 03
Live Signal Generator
Week 2-3 · ~5-7 days
Upcoming
Port Strategy Logic — Historical arrays → Live streaming bars
  • Set up Databento live streaming on VPS
    Connect to Databento streaming API for real-time 15m and 3m bars. Subscribe to ES, NQ, GC, 6E, 6B simultaneously. Buffer the last N candles in memory — same data the backtester uses, now arriving live.
    Python
  • Port FVG and sweep detection to streaming mode
    The backtester processes a full historical array at once. The live version processes one new candle at a time, maintaining a rolling window. Port FVG detection, target identification, sweep confirmation to this model.
    Python
  • Port volume zone and entry zone detection
    Volume engulfing candle detection, 15m zone formation, 3m entry zone identification — all ported to run on the live bar stream. Each new 3m candle triggers a check for new zones and entry touches.
    Python
  • Validate live signals against manual chart review
    Run the live signal generator in dry-run mode (no orders placed). Compare every signal it generates to what you see manually on TradingView charts. Must match before connecting to IB. Run for minimum 5 trading days.
    Python
  • Validate signal rate matches backtest expectations
    Backtest shows ~25 trades/month on ES, ~17/month on NQ. Live dry-run should show similar frequency. If significantly lower → signal detection issue. If higher → filter may have bug. Must match ±30% before proceeding.
    Python
Phase 04
Order Execution & Risk Manager
Week 3-4 · ~5 days
Upcoming
Live Order Placement — ES only first, then expand
  • Build risk manager pre-trade checks
    Before every order: check daily loss limit not exceeded, check no existing open position on that instrument, check within session hours (8am-1pm EST), check not a summer month, check not high-impact news window. If any check fails → skip trade and log reason.
    Python
  • Build bracket order placement function
    When signal fires and risk checks pass: place a bracket order via ib_insync. Entry at zone price, SL at calculated level, TP at RR target — all three legs placed as one atomic bracket order. Confirm fills received.
    IB
  • Build structure-based breakeven logic
    Monitor open positions on the 3m bar stream. When Higher High + Higher Low forms (buy) or Lower Low + Lower High (sell) with minimum 15-minute delay — move SL to entry price via API order modification.
    Python
  • Build session-end force close
    At 1pm EST for NY session — any open positions are closed at market. No exceptions. This mirrors the backtester behaviour and prevents overnight risk on an intraday strategy.
    Python
  • Run 2 weeks on ES paper only
    Enable live order placement on ES paper account only. Monitor every trade manually. Confirm entry prices match signal prices. Confirm SL and TP are correct. Confirm breakeven moves correctly. Fix any issues before adding more instruments.
    IB
  • Expand to all 5 instruments
    After ES is stable: add NQ, then GC, then 6E, then 6B — one at a time with 2-3 days between each. Monitor that adding instruments doesn't cause memory or CPU issues on the VPS. Check RAM stays below 70%.
    VPS
Phase 05
Dashboard & Team Alerts
Week 4-5 · ~4 days
Upcoming
Monitoring Layer — Your team sees everything in real time
  • Create Telegram bot and team channel
    Create a Telegram bot via @BotFather. Create a private team channel. Add all team members. Configure the bot to post to the channel. Test with a manual message first. Set up alert types: signals, fills, closes, errors, daily summary.
    Free
  • Build Telegram alert messages
    Signal detected alert. Trade opened alert (instrument, direction, entry, SL, TP, RR). Trade closed alert (win/loss/BE, R achieved, duration). Daily summary (trades taken, wins/losses, net R). Bot error alert. Session start/end confirmation.
    Python
  • Build Streamlit dashboard
    Live dashboard accessible from any browser. Shows: today's trades table, open positions with live P&L, running win rate and net R, equity curve updating live, signals taken vs skipped, instrument-level breakdown. Auto-refreshes every 30 seconds.
    Python
  • Expose Streamlit dashboard securely
    Open port 8501 on VPS firewall. Add basic HTTP authentication so only team members can view it. Each team member accesses via browser: http://VPS-IP:8501. No complex setup needed for demo phase.
    VPS
Phase 06
Demo Validation & Live Decision
Month 2 · 30 days minimum
Final Gate
30-Day Paper Trading Review — Go / No-Go Decision
  • Run 30 days of fully automated paper trading
    Bot runs completely unattended during NY sessions. Team reviews Telegram alerts and dashboard daily. Log any discrepancies between live signals and what is expected from backtest.
    IB Paper
  • Weekly comparison: live vs backtest benchmarks
    ES target: ~25 trades/month, ~85% WR. NQ target: ~17 trades/month, ~81% WR. Combined: ~83 trades/month, ~82% WR. If live WR is within 10% of backtest target → proceed. If more than 15% off → investigate before live.
    Python
  • Verify execution quality
    Compare actual fill prices to expected signal prices. Slippage should be minimal on paper. Note any systematic fill issues — these indicate real-world execution challenges to plan for. Bracket orders should consistently place SL and TP correctly.
    IB
  • Go/No-Go decision for FTMO Challenge
    If 30-day paper results confirm: WR within 10% of backtest, no major execution issues, bot runs stably 24/7 — consider taking FTMO Challenge. Profit target 10% in 30 days. Backtest shows +38.8R/month on ES alone at 1% risk = comfortably achievable.
    FTMO
  • OR: Go live with personal account at 0.5% risk
    Alternative to FTMO: fund an IB live account and trade with 0.5% risk per trade for first month. At 1% risk on $10,000 account: ES alone targets ~$388/month. Small but validates the edge with real money before scaling.
    Live

10-Week Roadmap

Week-by-week breakdown of every milestone. Phases are sequential — do not start the next phase until the current one is fully validated.

Timeframe Milestone Owner Status
NOW
Planning sign-offReview this plan with the team. Confirm tech stack, timeline, and approach before any building begins.
Full team
In Planning
Week 1
Purchase VPS, install Ubuntu, secure serverNamecheap $10/mo · Buffalo NY · Ubuntu 22.04 LTS Server
Lead dev
Next
Week 1
Install Python, packages, upload codebaseAll dependencies installed · backtester runs on VPS · data cache transferred
Lead dev
Next
Week 1-2
Install IB Gateway · Open paper account · Test APIPaper account created · IB Gateway running · ib_insync connects · test order placed
Lead dev
Planned
Week 2
Port signal generator to live streamingDatabento live feed · FVG + sweep + volume zone running on real-time bars
Lead dev
Planned
Week 2-3
5-day dry run · validate signals vs manual chartsNo orders placed · signals compared to TradingView · must match before proceeding
Full team
Planned
Week 3
Build order manager · risk checks · bracket ordersPre-trade checks · entry + SL + TP bracket · session-end close
Lead dev
Planned
Week 3-4
ES paper trading live — monitor for 2 weeksES only · every trade reviewed manually · fix any issues before expanding
Full team
Planned
Week 4
Build Telegram bot + Streamlit dashboardTeam alerts firing · dashboard accessible from browser · all 5 instruments shown
Lead dev
Planned
Week 4-5
Expand to NQ · GC · 6E · 6B (one at a time)Add one instrument every 2-3 days · monitor VPS resources · confirm signals correct
Lead dev
Planned
Week 5-9
30-day full demo run — all 5 instrumentsFully automated · team reviews daily · weekly WR comparison vs backtest
Full team
Planned
Week 10
Go / No-Go decision for live tradingFTMO Challenge OR personal live account at 0.5% risk per trade
Full team
Decision Point

Known Risks & Mitigations

Every risk identified during planning. Each has a concrete mitigation already planned.

VPS internet outage during session
If VPS loses internet, open positions have no stop loss monitoring. This could cause runaway losses on live accounts.
→ IB bracket orders are server-side. SL and TP remain active even if bot disconnects. Safe on paper and live.
🔄
IB Gateway disconnects mid-session
IB Gateway occasionally disconnects. If the bot doesn't handle this, it stops placing orders silently.
→ ib_insync has built-in reconnection. Bot logs all disconnections to Telegram immediately so team is aware.
📉
Live WR significantly below backtest
Paper trading results may diverge from backtest due to execution differences, data feed timing, or signal detection bugs.
→ 5-day dry run phase before any orders. 2-week ES-only phase before full portfolio. Minimum 30 days paper before live.
💾
VPS runs out of RAM under full load
5 instruments streaming simultaneously + Streamlit + IB Gateway could push the 2GB RAM limit in volatile sessions.
→ Monitor RAM weekly. Disable Streamlit during active trading hours if needed. $10/month upgrade to 4GB if consistently above 80%.
🕐
Live signal rate much lower than backtest
Backtest targets ~25 trades/month on ES. If live generates only 5-10, something is wrong with the signal porting.
→ Dry run phase specifically validates signal frequency. Compare to TradingView charts manually. Must be within 30% before live orders.
📊
Volume data quality on live feed
The strategy depends on real CME volume for zone detection. If Databento live feed has any data quality issues, zones could be incorrect.
→ Compare Databento live volume to TradingView during dry run. Any systematic differences investigated before live orders begin.