Learn
How to build a trading bot with AI
You do not need to be a developer to build a futures trading bot anymore. With an AI model writing the code, the hard part moves from programming to two things the model cannot do for you: bring a real edge, and make the bot obey the prop firm's rules. This is the build as it actually goes, step by step, angled at the part most tutorials skip, which is surviving a funded account.
I build and backtest my own bot with AI and run it live on a prop firm, so these are the steps that held up against a real account, not just a tidy demo.
Step 1: write the strategy as rules, not vibes
Before any code, write the strategy down as precise rules a model can implement without guessing. Entry condition, exit condition, stop, target, position size, the exact times it can trade, what it does on a half day. If you cannot state it that plainly, the model will fill the gaps with assumptions and you will not know which ones. This step is yours, and it is where the edge lives.
Be specific about the instrument and the data. Micro E-mini Nasdaq on a one minute chart is a different bot from the same idea on five minute bars. The model will happily code either, so tell it exactly which.
Step 2: have the AI build it in small, checkable pieces
Hand the model one piece at a time: the data feed, then the signal logic, then the order layer, then the risk checks. Small functions you can read and test beat one giant script the model wrote in a single pass, because you can actually verify each part. Used in an agentic setup, the model can run the tests, read the failures, and fix its own code, which is closer to a real build than pasting snippets out of a chat window.
Python is the common choice for futures bots because the platform libraries and the examples are there. Ask the model to keep the strategy logic separate from the broker connection, so you can swap the firm later without rewriting the strategy. The exact prompts and the agentic loop I use to get firm-compliant code on the first pass are the part I keep for the paid build doc, but the shape above gets you a working bot.
Step 3: backtest against the firm, not just profit
A model will write an optimistic backtest if you let it: lookahead bias, no slippage, sizing that ignores the drawdown. Treat every backtest number as too good until you have checked it by hand. Then backtest the way the firm scores you, by capping the equity curve at the firm's drawdown figure, modeling the payout gates and the flat-by time, and counting the resets you would have bought.
A strategy that is net profitable but breaches the trailing drawdown once a month still fails a prop account. That gap, between a bot that backtests well and a bot that survives a funded account, is the whole prop-firm problem. There is a separate guide on backtesting the firm's way.
Step 4: run it on sim, then an eval, before anything funded
Paper-trade the bot live on a simulator first, because real data does things your backtest did not: gaps, partial fills, a feed that drops for ten seconds. Watch how it behaves around the flat-by time and the daily loss limit. Only when it has handled a few ordinary sessions cleanly does it go on a paid evaluation, and only after the eval does it touch a funded account.
The edge is yours, not the model's. An AI will write whatever strategy you describe, including a bad one, and make a losing idea look profitable with a clean backtest. Treat the model as a fast engineer, not a strategist. Pick the model you have access to and go deeper below.
Pick a model and go deeper
Claude and ChatGPT both build trading bots well, so use the one you have. The dedicated guides cover where each is strong and where each falls down, then the next steps are connecting the bot to a prop platform, backtesting the firm's way, and encoding the risk rules that keep an account alive.
FAQ
Can you really build a trading bot with AI if you can't code?
Yes, to a point. An AI model can write the order logic, wire up a futures API, and build the backtest from a clear set of rules, so you can get a working bot without writing it yourself. What it cannot do is invent a profitable strategy or know your prop firm's rules, so the edge and the firm constraints are still on you, and you still have to read the code well enough to check it.
What language should an AI write a futures trading bot in?
Python is the common choice, because the platform libraries for Tradovate, Rithmic, and the bridges, plus the examples, are widely available. Ask the model to keep the strategy logic separate from the broker connection so you can change firms later without rewriting the strategy.
What is the hardest part of building a prop-firm trading bot?
Not the code. It is bringing a real edge, and making the bot respect the firm's drawdown, consistency, and automation rules so it survives a funded account, not just a backtest. Most futures firms ban or restrict bots on the funded side, so picking the right firm comes before the build.
Should I trust the backtest the AI gives me?
No, not at face value. Models tend to produce optimistic backtests with lookahead bias, no slippage, and sizing that ignores the drawdown. Check every number by hand and re-run the test against the firm's drawdown, payout gates, and flat-by time before you believe it.