Custom Futures Trading Bot Development From Indicator Signals to Live Broker Execution

Off-the-shelf trading platforms force you into someone else’s logic, someone else’s risk model, and someone else’s data sources — with monthly fees stacked on top. We build custom futures trading bots from scratch: OCR-driven signal capture from any indicator suite, adaptive threshold engines that respond to your live PnL, full-fidelity web dashboards, and direct broker auto-execution. Here is exactly how a real production bot is built — based on the live MNQ system we shipped for Jacob Fischer’s 2026PAGSTUFF project.

Back to Blog

Why Build a Custom Trading Bot Instead of Buying One

Every trader who comes to us with a bot idea has already gone through the same cycle. They tried NinjaTrader strategies, paid for a couple of TradingView alert services, signed up for an off-the-shelf platform like 3Commas or Cornix, and watched all of them fall short the moment their actual edge required custom logic. Pre-built platforms handle the simplest signals well — a single moving average cross, an RSI threshold — but a real edge in futures trading is rarely that simple.

Most successful discretionary traders make decisions by combining multiple indicator panels, multi-timeframe alignment, live order flow, and session timing rules. None of that fits cleanly into a TradingView Pine Script alert. None of it fits into a 3Commas signal bot. And every prop firm has its own risk caps, max drawdown rules, and instrument restrictions that no off-the-shelf bot respects. The result is a system that almost works, but always has one missing piece — and that missing piece is usually the difference between a profitable strategy and a flat one.

A custom-built bot solves that. We start with your existing rules — whether they live in a TradingView indicator pack, a NinjaTrader strategy, or just a written checklist — and translate them into production code that runs 24/7, executes on your broker, and reports back to a dashboard you can pull up on your phone. You own the code, you own the signals, and you can extend or modify it without asking permission from a platform.

7
indicator panels parsed simultaneously via OCR
10
component composite scoring system (0.0 to 1.0)
5s
screen capture cadence for live signal updates
24/7
background daemon with auto-restart watchdog

The Tech Stack Behind a Production Trading Bot

Every custom trading bot we deliver runs on a battle-tested Python backend with a real-time web dashboard, real broker connectivity, and operational tooling for monitoring, kill-switching, and analytics. Below is the actual stack from the 2026PAGSTUFF MNQ futures bot — production code, not a prototype.

Python 3.10+ Tesseract OCR OpenCV MSS Screen Capture aiohttp / FastAPI WebSocket Tradovate REST + WS Supabase Sync Discord Webhooks JSONL Event Log macOS Quartz PrintWindow API
Bot Architecture
TradingView Browser
Screen Capture + OCR
main.py — Trade Logic
Adaptive Engine
Composite Score
Web Dashboard
Tradovate Executor
Discord Alerts
Supabase Sync

OCR-Based Signal Capture: Read Any Indicator on Any Platform

The core innovation of the 2026PAGSTUFF bot is its OCR signal layer. Most trading platforms only let you trigger automation through their own native APIs — which is fine if you use the platform’s built-in indicators, but useless when your edge depends on a custom Pine Script or a private indicator pack you bought from another developer. OCR-based capture solves that.

Here is how it works. The trader keeps TradingView open in a browser with their full indicator stack visible. The bot captures a screenshot of the indicator panel region every 5 seconds, runs Tesseract OCR over each panel independently, and parses the text into a structured signal state. In the production MNQ bot, we read seven panels — each one covering a different timeframe range — and detect when three or more agree on the same direction. When alignment forms, the bot fires an ENTRY signal. When alignment breaks, it fires an EXIT.

Multi-Engine OCR

Tesseract for accuracy and template matching for raw speed (4x faster). HSV V-channel preprocessing makes the read color-agnostic so green, red, and white text all parse identically.

OCR Confidence Filtering

Every read carries a Tesseract confidence score. Reads below 70% confidence are discarded. Two consecutive identical reads are required before a signal is accepted — no flicker triggers.

Panel State Machine

Each panel resolves to one of seven states: Ready Long, Ready Short, Not Ready, Mixed, Weak Long, Weak Short, or NA. The state machine handles transitions cleanly without missed signals.

Background Capture

macOS uses Quartz, Windows uses PrintWindow API. Both let the bot read indicator panels even when the browser is minimized or covered by other windows — no need to keep TradingView in front.

# Composite scoring — blends 10 components into a 0.0-1.0 trade quality score def compute_composite_score(panels, order_flow, vwap, orb, ttm, vp, mode): components = { 'panel_alignment': ready_count / panel_count, # 20% 'order_flow': score_flow(order_flow), # 18% 'overlay_signals': score_star_bomb_golden(panels), # 15% 'hold_time': score_hold(seconds_aligned), # 10% 'vwap_position': score_vwap(price, vwap, side), # 8% 'orb_breakout': score_orb(orb, side), # 7% 'ttm_squeeze': score_ttm(ttm), # 7% 'volume_profile': score_vp(vp), # 5% 'unanimity_bonus': 1.0 if na_count == 0 else 0.5, # 5% 'mode_safety': 1.0 if mode == 'NORMAL' else 0.7 # 5% } return sum(components[k] * WEIGHTS[k] for k in components)

Why this matters for your bot: OCR-based signal capture means we can build a bot around any indicator setup — even proprietary scripts or paid packs without API access. If your eyes can read it on screen, the bot can read it.

Adaptive Threshold Engine: A Bot That Learns From Its Own PnL

A static rule set is the most common reason bots fail in production. A bot tuned to take 3-of-5 panel agreement with a 3-second hold might run beautifully in a trending market, then bleed slowly through a chop day. The 2026PAGSTUFF bot solves this with an adaptive threshold engine that recomputes its entry rules every 60 seconds based on recent performance.

Four modes drive the bot’s behavior. In NORMAL mode (the default), the bot requires 3 panels in agreement and a 3-second hold time. If the win rate drops below 35% over the last 20 trades, the bot enters CAUTIOUS mode, which tightens the hold to 4.5 seconds and refuses to enter without the order flow confirming direction. If no trades have fired in 45 minutes, the bot enters DROUGHT mode and lowers the bar to 2 panels with a 0.5-second hold — designed to catch the next clean setup. RELAXED mode loosens slightly when the trade frequency drops below 2 per hour but the win rate is still acceptable.

Real-Time Performance Stats

Win rate, hourly rate, total trades, net points, net dollars — all computed every 60 seconds from the rolling trade log and streamed to the dashboard.

Mode-Aware Risk

Stops and take-profits scale with the composite score. A 0.70 score gets a 1:2 risk-reward; a 1.00 score gets a 1:6 risk-reward with tighter stops and wider targets.

Daily Loss Circuit Breaker

Hits a -$200 loss threshold? The bot halts auto-execution for the day. Loss cooldowns of 2 minutes after every losing trade prevent revenge trading.

Position Reconciliation

Every 30 seconds the bot pulls live broker positions and cross-checks against its internal state. Any mismatch triggers an immediate sync — no silent drift.

Direct Broker Auto-Execution: Tradovate, NinjaTrader & Beyond

Reading signals is only half the job. The bot needs to execute orders, manage stops and take-profits, handle partial exits, and reconcile positions across restarts. The 2026PAGSTUFF bot ships with a Tradovate executor daemon that handles full bracket order management via REST API and live market data via WebSocket. We have built similar executors for NinjaTrader, Rithmic-backed platforms, and prop firm copy-trade rails.

On every signal, the executor places a market entry order (IOC), then immediately follows up with a stop-loss order and a take-profit limit order. The stop and TP distances are dynamic — computed from the composite score so high-confidence trades get tighter stops and wider targets. A score of 0.70 gets a 10-point stop and 20-point TP (1:2). A score of 1.00 gets a 6-point stop and a 36-point TP (1:6). Half-exits trigger automatically at +50% of the TP distance, locking in partial profit while letting the runner go.

# Dynamic stop-loss + take-profit sizing based on composite score def get_bracket_params(composite_score): if composite_score >= 1.00: return {'stop': 6, 'tp': 36, 'rr': '1:6'} elif composite_score >= 0.85: return {'stop': 7, 'tp': 28, 'rr': '1:4'} elif composite_score >= 0.70: return {'stop': 10, 'tp': 20, 'rr': '1:2'} # Below 0.70 = no auto-trade. Manual review only. return None

Kill-Switch File Watcher

A simple touch ~/jstar/shared/kill_autotrading halts all execution instantly. Useful for prop firm rule violations, news events, or just stepping away from the desk.

Session Blackouts

No entries between 9:30-9:35 AM ET (open chop) or 11:30 AM-1:00 PM ET (lunch). Configurable per instrument and per trader preference.

Choppy Market Filter

If the price range is under 3 points in the last 20 seconds, the bot refuses to enter. Prevents getting chopped up in low-volatility conditions.

Bad-Hour Block

Tracks win rate by hour-of-day. Blocks all entries during any hour that has historically had under 30% win rate. The bot avoids your worst hours automatically.

The Web Dashboard: Mission Control on Any Device

Every production trading bot needs a dashboard. Watching log files in a terminal works for a day, but real operators need a fast visual readout of what the bot is doing right now — ideally one they can pull up on their phone while they’re away from the desk. The 2026PAGSTUFF dashboard runs on localhost:8080 by default, with optional Cloudflare Tunnel exposure for remote access.

Live Candlestick Charts

Five timeframes (5s, 1m, 5m, 15m, 1h) with entry/exit markers overlaid. Watch the bot’s trade decisions in real time without looking at a separate platform.

Equity Curve

Cumulative P&L over time, drawn live as trades close. The shape of the curve tells you instantly whether the bot is in a healthy regime or breaking down.

Trade Cards

Visual card for each trade showing entry price, exit price, P&L in points and dollars, composite score at entry, and reason for exit. Full audit trail at a glance.

Order Flow Tab

Live DOM imbalance, tick delta, cumulative delta, VWAP, and signal strength. Streamed via WebSocket from the Tradovate market data feed at 0.5-second cadence.

Voice alerts included: The bot speaks through your speakers on entry/exit (“Entry Long at 21450.25,” “Exit Long. Result +5.25 points.”) so you can hear what’s happening even when the dashboard isn’t in front of you. Optional Discord webhook for trade alerts to your phone or a team channel.

Operational Tooling: Logs, Replay, Analysis

A bot that runs in a black box is a bot you cannot trust. Every event the 2026PAGSTUFF bot fires — signal detection, order placement, stop-loss hit, partial exit, full exit — gets logged as a structured JSONL event with full context. Months later, you can replay any trade decision exactly, see what the bot saw, and understand why it acted.

JSONL Event Log

Every trade event written as a single JSON line with timestamp, action, side, price, panels snapshot, composite score, and exit reason. Trivial to grep, filter, or import into pandas.

analyze.py Performance Report

Run a single command to get win rate by hour, win rate by day-of-week, win rate by composite score band, and effectiveness of every entry/exit rule.

Panel Weight Optimization

After 400+ trades, run analyze_weights.py to compute which panels actually correlate with winning trades — and adjust weighting accordingly.

Supabase Cloud Sync

Optional push of every trade event to a Supabase table for cross-device dashboards, team monitoring, or building a public “live PnL” page on your website.

What We Can Build For You

The 2026PAGSTUFF bot is the proof. Here is the full menu of capabilities we bring to a custom futures or crypto trading bot build.

Deliverables

Custom Bot Build Menu

OCR Signal Capture
Read any indicator panel on TradingView, NinjaTrader, ThinkOrSwim, Sierra Chart, or any other platform — even when no API exists.
Adaptive Logic Engine
Threshold-shifting state machine that adjusts entry rules based on live PnL, win rate, and trade frequency — fully configurable per trader.
Broker Auto-Execution
Tradovate, NinjaTrader, Rithmic, IB, or any broker with an API. Bracket orders, dynamic stops, partial exits, position reconciliation built in.
Real-Time Web Dashboard
Charts, equity curve, trade cards, order flow, and live signal panel — accessible from any device. Cloudflare Tunnel for remote access.
Risk Management Layer
Daily loss circuit breakers, max trades caps, session blackouts, choppy market filters, kill switches, and prop firm rule guardrails.
Analytics & Replay
Full JSONL event log, automated performance reports, per-rule effectiveness analysis, and panel weight optimization for long-term tuning.

Want a deeper look at our other custom finance work? Our LandIntel data platform shows how we build production back-ends, and our full services menu covers every layer we work in — from signal capture to dashboard to broker connectivity.

Frequently Asked Questions

How much does a custom futures trading bot cost to build?
Custom trading bots typically start at $4,500 for a single-strategy bot with broker connectivity, and scale up to $15,000+ for multi-strategy systems with web dashboards, OCR signal capture, adaptive thresholds, and full risk management. We provide a fixed quote before work begins — no scope creep, no hourly billing surprises. The 2026PAGSTUFF MNQ bot, for reference, included OCR, adaptive logic, dashboard, broker execution, and Discord/Supabase integrations as a single fixed-scope build.
Can you build a bot that reads signals from TradingView indicators?
Yes — we have shipped production bots that capture TradingView indicator panels via OCR (Tesseract or template matching), parse signal states across multiple panels, and fire trade alerts in real time. This works with any indicator suite, including proprietary Pine Script systems where no API or webhook is available. If you can see it on screen, we can teach the bot to read it.
Which futures brokers do you integrate with?
We have built production integrations with Tradovate (REST + WebSocket for market data, full bracket order execution). We can build to any broker with an API including NinjaTrader, Rithmic-backed platforms, Interactive Brokers, Topstep, Apex Trader Funding, and similar prop firm copy-trade rails. Crypto brokers (Hyperliquid, Bybit, Binance, dYdX) are also supported — see our Rubicon trading agent writeup for an example.
Is the code mine when you deliver the bot?
Yes — you own 100% of the source code outright on delivery. No SaaS lock-in, no monthly platform fees, no revenue share. We deliver a private GitHub repository, deployment scripts, run scripts, full documentation, and a one-on-one walkthrough. You can hire any other developer to extend or modify it later, or we can stay on as your maintenance partner. Your call.
What about prop firm rule compliance?
We have built bots that respect Topstep, Apex, and similar prop firm constraints — max contracts, max daily loss, max drawdown, scaling rules, news event blackouts, and trailing drawdown calculations. Risk guardrails are first-class features, not afterthoughts. The bot will refuse to take a trade that would violate your rules.

Ready to build your trading bot?

Whether you want to automate a Pine Script strategy, run a multi-bot prop firm setup, or build a SaaS that licenses your edge to other traders — we can ship it. Call or text (320) 360-8285 to start scoping. DM HUNT for a fixed-quote within 48 hours.

Free Quote