How AI Day Trading Bots Actually Work: The 8-Stage Pipeline from Data to Execution
A builder's breakdown of a production AI day trading system. Covers the full pipeline: market data ingestion, regime detection, screening, AI conviction scoring, position sizing, execution, dynamic exits, and self-improvement.
Want to put this into practice?
Tradewink uses AI to scan markets, generate signals with full analysis, and execute trades automatically through your broker.
- How Does an AI Day Trading Bot Work?
- Stage 1: Pre-Scan Gates
- Market Regime Detection
- Intraday Regime Overlay
- Monk Mode
- Stage 2: Ticker Screening
- Ticker Sources
- Scoring System
- Stage 3: Strategy Evaluation
- Momentum Strategies
- Mean Reversion Strategies
- Advanced Strategies
- Signal Discretization
- Stage 4: AI Conviction Scoring
- Default: Single LLM Call
- Opt-In: Multi-Agent Team Evaluation
- Model Routing
- Stage 5: Position Sizing
- Risk-Based Sizing
- ATR-Based Sizing
- Half-Kelly Sizing
- Micro Account Mode
- Stage 6: Trade Execution
- Risk Manager Gate
- Broker Submission
- Smart Execution
- Stage 7: Dynamic Exit Management
- Trailing Stops with Broker Sync
- MFE/MAE Tracking
- ML-Driven Exit Engine
- Regime-Shift Exit
- Time-Based Exit
- End-of-Day Flatten
- Stage 8: Self-Improvement Loop
- Post-Trade Reflection
- Walk-Forward ML Retraining
- Thompson Sampling Strategy Selector
- Confidence Calibration
- Architecture Diagram
- What AI Day Trading Bots Cannot Do
- Frequently Asked Questions
- How much money do I need to start AI day trading?
- Does the AI trade with my money or its own?
- How many trades does the system make per day?
- Can I override the AI's decisions?
- Is this a black box?
How Does an AI Day Trading Bot Work?
An AI day trading bot is a software system that autonomously screens markets, evaluates trade candidates using machine learning and large language models, sizes positions based on risk parameters, executes orders through a broker API, and manages exits in real time. The best systems also learn from outcomes, retraining models on actual trade results to improve future decisions. Here is the 8-stage pipeline that powers Tradewink's autonomous day trading system.
Stage 1: Pre-Scan Gates
Before scanning a single ticker, the system runs safety checks to determine whether trading conditions are favorable. This prevents the bot from trading during dangerous or low-probability periods.
Market Regime Detection
A Hidden Markov Model (HMM) classifies the current market regime by analyzing SPY returns. The model identifies three states:
- Bull regime: Trending up, momentum strategies favored
- Sideways regime: Range-bound, mean reversion strategies favored
- Bear regime: Trending down, defensive positioning, reduced size
The regime classification determines which strategies are active, how aggressively the system sizes positions, and whether certain trade types are skipped entirely.
Intraday Regime Overlay
On top of the daily HMM regime, a 5-minute efficiency ratio on SPY classifies intraday conditions as "trending," "choppy," or neutral. If the intraday regime flips from trending to choppy mid-session, the system triggers an AI-powered exit debate on open positions.
Monk Mode
Monk mode is a pre-scan gate that skips trading during unfavorable conditions:
- Quiet hours (first 5 minutes after open, last 30 minutes before close)
- Regime transitions (when the HMM regime has recently changed)
- Pre-earnings blackout (skip tickers reporting earnings within 24 hours)
- Low-conviction periods (when recent trade outcomes have degraded confidence)
Stage 2: Ticker Screening
The screener narrows thousands of tickers to 10-20 actionable candidates using quantitative filters.
Ticker Sources
Candidates come from three pools, merged and deduplicated:
- Default universe: 50+ high-liquidity tickers (AAPL, NVDA, TSLA, META, etc.)
- Finviz dynamic sourcing: Real-time top gainers, unusual volume, gap-ups/downs
- User watchlist: Tickers added by the trader get priority scanning and a +15 point score boost
Scoring System
Each ticker is scored 0-100 across 9 factors:
| Factor | Weight | What It Measures |
|---|---|---|
| Volume ratio | High | Current volume vs 20-day average |
| ATR% | High | Normalized volatility (daily range as % of price) |
| Gap % | Medium | Pre-market gap size |
| RSI position | Medium | Oversold/overbought relative to strategy |
| Relative volume | Medium | Intraday volume acceleration |
| 52-week proximity | Low | Distance from 52-week high/low |
| Day range position | Low | Where price sits in today's range |
| Sector momentum | Low | Sector ETF relative strength |
| S&P 500 heatmap | Low | Whether the ticker appears in top movers |
Only tickers scoring above the minimum threshold proceed to strategy evaluation.
Stage 3: Strategy Evaluation
The strategy engine runs each screened ticker through multiple strategy algorithms simultaneously. Tradewink uses 16+ strategies across three categories:
Momentum Strategies
- Breakout: Price above resistance on elevated volume
- Gap and Go: Pre-market gap with continuation volume
- Opening Range Breakout (ORB): First 15-minute range expansion
Mean Reversion Strategies
- RSI Bounce: Entry when RSI drops below 30 with volume confirmation
- VWAP Reversion: Price deviation from VWAP with mean-reversion entry
- Bollinger Band Squeeze: Entry at lower band with contracting bandwidth
Advanced Strategies
- Options Flow Confirmation: Unusual options activity confirming directional bias
- Pairs Trading: Cointegrated pairs with z-score divergence
- Sector Rotation: Capital flow between sectors based on relative strength
Each strategy produces a signal with direction (long/short), entry zone, stop-loss, target price, and a raw score.
Signal Discretization
Raw strategy signals are classified into a 5-tier system: Strong Buy, Buy, Neutral, Sell, Strong Sell. An ML-based signal quality classifier further evaluates whether the signal pattern historically led to profitable trades.
Stage 4: AI Conviction Scoring
This is where modern AI trading systems differ from classical algorithmic trading. Instead of relying solely on quantitative signals, the system uses large language models to evaluate each candidate with contextual reasoning.
Default: Single LLM Call
For each candidate that passes screening and strategy evaluation, a single AI call generates a conviction score from 0 to 100. The model receives:
- Technical setup data (indicators, levels, volume)
- Fundamental context (earnings date, insider activity, sector performance)
- Market regime classification
- Recent trade outcomes for similar setups
The conviction score multiplies the composite quantitative score, promoting high-conviction setups and demoting low-conviction ones.
Opt-In: Multi-Agent Team Evaluation
For deeper analysis, a 3-agent team evaluates the trade:
- Bull agent: Argues the case for the trade
- Bear agent: Argues against
- Arbitrator: Weighs both arguments and assigns final conviction
This multi-agent debate catches risks that quantitative filters miss — like an upcoming Fed meeting that changes the macro backdrop, or a sector rotation pattern that makes the trade thesis weaker.
Model Routing
AI calls are routed through multiple providers (Claude, GPT-5, Gemini) via OpenRouter. A model router selects the cheapest appropriate model per task — lightweight models for screening, heavier models for conviction scoring. This keeps AI costs manageable even with hundreds of daily evaluations.
Stage 5: Position Sizing
Position sizing determines how much capital to allocate. The system calculates three sizes and uses the most conservative:
Risk-Based Sizing
Standard percentage-of-equity risk. With a $10,000 account and 1% risk per trade, maximum dollar risk is $100. If the stop-loss is $2 away from entry, position size = 50 shares.
ATR-Based Sizing
Uses Average True Range to normalize for volatility. A volatile stock (high ATR) gets fewer shares than a stable stock, holding dollar risk constant. Multiplier: 1.5x ATR for day trades, 2x ATR for swing trades.
Half-Kelly Sizing
The Kelly Criterion calculates optimal bet size based on win rate and reward/risk ratio. Half-Kelly reduces the theoretical optimum by 50% to account for estimation error and reduce variance.
Micro Account Mode
For accounts under $1,000, the system automatically enables:
- Fractional shares (as small as 0.001 shares)
- Reduced risk per trade (3% max vs 1-2% standard)
- Lower concentration limit (25% of equity per position)
- $1 minimum order value
The most conservative of the three methods wins. This means position sizes are always at or below the optimal risk level.
Stage 6: Trade Execution
Once a candidate is sized, it passes through the execution pipeline:
Risk Manager Gate
The risk manager checks:
- Daily loss limit: If the day's losses exceed the configured threshold, no new trades
- Position count: Maximum concurrent positions not exceeded
- Sector concentration: Not overexposed to any single sector
- PDT rule: Pattern Day Trader rule enforcement — tracks round trips over 5 business days, blocks trades that would trigger PDT restriction
- Circuit breaker: If a cascade of losses occurs in a short window, trading pauses
Broker Submission
Orders are submitted through an abstract broker interface that supports 8 brokerages. The system is non-custodial — your money stays at your broker. Tradewink sends order instructions via API.
Each trade is logged with an audit trail: timestamp, strategy, conviction score, sizing rationale, broker confirmation, and fill price.
Smart Execution
For larger orders, a VWAP/TWAP slicing algorithm splits the order across multiple fills to minimize market impact.
Stage 7: Dynamic Exit Management
Open positions are monitored continuously with multiple exit mechanisms running in parallel:
Trailing Stops with Broker Sync
As a position moves in your favor, the stop-loss ratchets upward. The system cancels the old stop order at the broker and submits a new one at the trailed level — ensuring the broker-side stop always matches the system's calculated level.
MFE/MAE Tracking
Maximum Favorable Excursion (MFE) and Maximum Adverse Excursion (MAE) are tracked on every tick. This data feeds into the ML exit model and post-trade analytics.
ML-Driven Exit Engine
A machine learning model evaluates 6 possible actions on each monitoring cycle:
- Hold position
- Tighten stop
- Take partial profits
- Exit fully at market
- Extend target
- Reverse position
The model is trained on historical trade outcomes, learning which exit patterns maximize realized P&L for each strategy type.
Regime-Shift Exit
If the intraday regime flips (e.g., trending to choppy), the system triggers a bull/bear AI debate on whether to hold or exit. This catches regime transitions that purely quantitative stops would miss.
Time-Based Exit
Positions that haven't moved after 90 minutes (configurable) are closed at market. Stagnant positions tie up capital with opportunity cost.
End-of-Day Flatten
All day trade positions are closed before market close. No overnight risk on day trades.
Stage 8: Self-Improvement Loop
The most underappreciated component of an AI trading system is the feedback loop. Without it, the system's performance degrades as market conditions evolve.
Post-Trade Reflection
After every closed trade, a TradeReflector AI analyzes:
- What went right or wrong
- Whether the entry, sizing, and exit were optimal
- Lessons learned for similar future setups
These reflections are stored in a database and injected into future conviction scoring calls, giving the AI memory of past mistakes.
Walk-Forward ML Retraining
Every 1.5 hours, ML models retrain on recent trade outcomes using walk-forward validation. This prevents overfitting to stale data while adapting to current market conditions.
Thompson Sampling Strategy Selector
A reinforcement learning bandit (Thompson Sampling) maintains a belief distribution over each strategy's performance across 7 market regimes. Strategies that perform well in the current regime get higher weight; underperformers get reduced allocation. This happens automatically — no manual strategy selection needed.
Confidence Calibration
The system tracks whether its confidence scores match actual outcomes. If the AI consistently rates trades at 80% confidence but they only win 55% of the time, the calibrator adjusts future scores downward until predicted and actual performance align.
Architecture Diagram
Pre-Scan Gates
|-- HMM Regime Detection (SPY)
|-- Intraday Regime Overlay (5-min efficiency ratio)
|-- Monk Mode (quiet hours, earnings blackout, regime transitions)
v
Screening (50+ tickers + Finviz + watchlist)
|-- Volume, ATR%, gap, RSI, relative volume scoring
v
Strategy Evaluation (16+ strategies)
|-- Momentum, mean reversion, breakout, flow, pairs
|-- Signal discretization (Strong Buy -> Strong Sell)
v
AI Conviction Scoring
|-- Single LLM call (default) or 3-agent debate (opt-in)
|-- Model routing: cheapest appropriate model per task
v
Position Sizing
|-- Risk-based, ATR-based, half-Kelly (most conservative wins)
|-- Micro account adjustments for <$1,000 accounts
v
Execution
|-- Risk manager gate (daily loss, PDT, concentration, circuit breaker)
|-- Broker submission via abstract BrokerClient (8 brokers)
v
Dynamic Exits
|-- Trailing stops with broker sync
|-- ML exit model (6 actions)
|-- Regime-shift debate, time-based exit, EOD flatten
v
Self-Improvement
|-- Trade reflection (AI-generated lessons)
|-- Walk-forward ML retraining (every 1.5 hours)
|-- Thompson Sampling strategy selector
|-- Confidence calibration
What AI Day Trading Bots Cannot Do
No AI trading system can predict the future or guarantee profits. Here's what to be realistic about:
- Black swan events: No model predicts sudden crashes, halts, or geopolitical shocks. Risk management (stop-losses, position limits) is the only defense.
- Regime changes: When the market shifts from bull to bear, historical patterns break down. The system adapts via retraining, but there's always a lag.
- Slippage and fills: In fast-moving markets, your fill price may differ from the AI's target. Smart execution helps but can't eliminate slippage entirely.
- Overfitting risk: ML models can learn patterns that don't generalize. Walk-forward validation mitigates this but doesn't eliminate it.
- Costs: Commissions, slippage, and AI API costs reduce gross returns. Position sizing must account for total transaction costs.
The CFTC has explicitly warned that "AI won't turn trading bots into money machines." Any platform promising guaranteed returns is a red flag.
Frequently Asked Questions
How much money do I need to start AI day trading?
Tradewink supports accounts as small as $500 with micro account mode (fractional shares, adjusted risk parameters). However, pattern day trader rules require $25,000 for unlimited day trades. Accounts under $25,000 are limited to 3 day trades per 5 business days.
Does the AI trade with my money or its own?
Your money stays in your existing brokerage account. Tradewink connects via API and sends order instructions — it never holds, transfers, or has custody of your funds. You can revoke API access from your broker's settings at any time.
How many trades does the system make per day?
It depends on market conditions. In a trending bull market, the system may find 5-10 opportunities. In choppy or quiet markets, monk mode may skip trading entirely. Quality over quantity — the system only trades when the pipeline produces high-conviction setups.
Can I override the AI's decisions?
Yes. Automation is fully optional. You can use Tradewink in signal-only mode (receive AI trade ideas, execute manually) or configure automation with your own risk limits, excluded tickers, and preferred strategies.
Is this a black box?
No. Every signal comes with a full written analysis explaining the reasoning, technical setup, entry/stop/target levels, conviction score, and strategy type. The codebase is open-source under MIT license. You can audit or modify any component.
Frequently Asked Questions
How does an AI day trading bot actually make trading decisions?
A production AI day trading bot combines quantitative screening, strategy algorithms, and large language model reasoning in a sequential pipeline. First, quantitative filters narrow thousands of tickers to a handful of candidates based on volume, volatility, and momentum. Strategy algorithms evaluate each candidate for specific setups (breakouts, VWAP reversions, momentum signals). Finally, an LLM assigns a conviction score based on contextual reasoning — weighing technical setup quality against market regime, fundamentals, and recent trade outcomes.
What is market regime detection and why do AI trading systems use it?
Market regime detection classifies current market conditions as trending (bull/bear) or range-bound using statistical models like Hidden Markov Models. AI trading systems use regime detection to adapt their strategy weights — momentum strategies work better in trending regimes while mean reversion strategies work better in range-bound conditions. Without regime detection, a bot might keep applying momentum strategies during a choppy sideways market, generating frequent losing trades on false breakouts.
How does position sizing work in an automated trading system?
Automated position sizing calculates trade size based on risk management rules rather than arbitrary dollar amounts. The system typically computes three independent sizes — percentage-of-account risk, ATR-based risk, and a Kelly Criterion fraction — and uses the most conservative. This means no single trade can risk more than a defined percentage of the account (typically 1-2%), and position size automatically scales with the stock's volatility and the AI's conviction level.
Can AI trading bots learn and improve from their trades?
Yes, the most sophisticated AI trading systems include a self-improvement loop. After each trade closes, the system records the outcome and uses it to recalibrate confidence scores, retrain ML classifiers on what setups actually produced profits, and adjust strategy weighting through reinforcement learning. Over time, the system learns which patterns, regimes, and market conditions produced the best results for its specific trading universe and adapts accordingly.
What prevents an AI trading bot from making catastrophic mistakes?
Multiple layers of safety guards prevent catastrophic losses. Risk manager checks enforce hard limits on position size, daily loss limits, sector concentration, and PDT rule compliance before any order is submitted. Circuit breakers halt trading if cumulative daily losses exceed a threshold. Market regime gates skip trading in unfavorable conditions. Paper trading mode allows testing without real capital. All orders require confirmation by default, and every trade is logged to an immutable audit trail for review.
Trading Insights Newsletter
Weekly deep-dives on strategy, signals, and market structure — written for active traders. No spam, unsubscribe anytime.
Ready to trade smarter?
Get AI-powered trading signals delivered to you — with full analysis explaining every trade idea.
Get free AI trading signals
Daily stock and crypto trade ideas with full analysis — delivered to your inbox. No spam, unsubscribe anytime.
Related Guides
What Is AI Trading? A Complete Guide for 2026
AI trading uses artificial intelligence to analyze markets, identify opportunities, and execute trades. Learn how it works, its advantages over manual trading, and how to get started.
How AI Trading Signals Work: From Data to Trade Idea
Ever wonder how AI generates trading signals? We break down the full pipeline: data ingestion, pattern recognition, scoring, filtering, and delivery.
Risk Management for Traders: The Only Guide You Need
Risk management is what separates profitable traders from broke ones. Learn position sizing, stop-loss strategies, portfolio heat management, and the math behind long-term profitability.
Position Sizing: How to Calculate the Right Trade Size Every Time
Position sizing determines how much capital to risk per trade. Learn the fixed-percentage, ATR-based, and Kelly Criterion methods with practical examples.
Momentum Trading: Complete Strategy Guide for Breakout Stocks
Complete momentum trading strategy guide. Learn how momentum trading works, how to find breakout stocks, time entries with volume confirmation, manage risk, and automate momentum strategies with AI.
Key Terms
Related Signal Types
Founder of Tradewink. Building autonomous AI trading systems that combine real-time market analysis, multi-broker execution, and self-improving machine learning models.