My bot didn't start with AI. It started with one rule-based strategy, the opening range breakout. But early on I had a question I couldn't stop thinking about: what if a large language model looked at the same chart I was looking at, and said whether to take the trade?
So I tried it. First with GPT, then with Claude alongside it, and then with the two of them voting. The bot logged every question and every answer, which means I can now look back at exactly how it went. It turned out to be one of the most interesting experiments of the whole build.
How the AI was wired in
Every few minutes during the session, the bot built one snapshot of the market and sent it to the model:
- the most recent 5-minute candles
- pivot levels, the previous day's range, and weekly and monthly highs and lows
- option open interest: where the big call and put positions sit
It asked for a strict JSON answer: call, put or no trade, an entry level, a stop, targets, a confidence score and a one-line reason. The model never placed an order itself. It suggested an entry. Ordinary code checked it, sized it, placed it and managed the exit.
That split was the best decision in the whole setup. Whatever the model said, the stops and risk limits were plain rules I could test.
Two models, one chart, different answers
Next I added Claude alongside GPT and sent both the identical snapshot at the identical moment — thousands of times over the following months.
I expected them to agree most of the time. They didn't. Often one wanted to trade while the other said stay out, and every so often they called opposite directions on exactly the same data.
A real example, from a morning in April, a few minutes after the open:
- Claude: buy a put — "clear bearish structure with lower highs after rejection from the high."
- GPT, reading the same numbers: no trade — "choppy with conflicting signals."
Same chart, same second, two completely different reads.
They had personalities
Once I counted the answers, a pattern jumped out. Both models were equally keen to trade, but GPT leaned bullish and Claude leaned bearish. Given the same data, GPT reached for calls more often, and Claude reached for puts.
Nothing in my prompt asked for that. It was a useful reminder that a model's "view" is partly the model, not the market — and that you learn a lot by measuring instead of assuming.
Making them vote
My first design gave Claude a veto. GPT made the call; if Claude disagreed strongly enough, the trade was blocked, and if Claude wasn't sure, it stayed out of the decision.
Within a couple of weeks I flipped it around and let Claude choose the entries directly, keeping the same rule-based exits. Later I added a second kind of vote: asking each model the same question three times and trading only if a majority agreed. That smooths out the odd one-off answer, at the cost of more calls to the model.
What the trades showed
The good news first: trades where Claude chose the entry held up well, and not just in one lucky stretch. I checked it the strict way, looking across whole trading days rather than individual trades, and the result stayed positive month after month. As an entry filter sitting in front of solid rules, the AI earned its place.
Two other findings surprised me more, and changed how I think about AI in trading.
Confidence didn't mean much. Claude's most confident calls did no better than its moderately confident ones. The confidence number read well, but it didn't predict which trades would work.
Agreement didn't add anything. I matched each of Claude's trades to what GPT thought at that moment:
| GPT's view when Claude entered | How those trades did |
|---|---|
| Agreed with Claude | Good |
| Wanted no trade | Good |
| Called the opposite direction | Just as good, if not slightly better |
A second model agreeing felt reassuring, but it didn't make the trades any better. That's worth knowing before you build an elaborate multi-model setup: the simpler version was just as good.
What I'd tell someone adding AI to a trading bot
- Let the model suggest, never execute. Entries can be the model's idea. Sizing, stops and exits should be code you can test.
- Force a structured answer. Free-text opinions are impossible to measure. A fixed JSON format made everything in this post possible.
- Log every prompt and every answer. The log is what turned hunches into findings.
- Measure models on their own trades. They're not interchangeable, and their leanings are real.
- Don't lean on the confidence number unless your own data shows it predicts outcomes.
Used this way, an AI model is a genuinely useful second pair of eyes — as long as the rules around it stay simple and testable. If you're thinking of building something similar, start with the basics in algo trading in India: the rules, the cost, and what to do first, and for connecting to your broker, getting a Zerodha Kite Connect API key.