Work · Fintech · Trading engine
Zerodha Bot
It started by obeying one script. Now it reads the market, picks its stocks, questions Claude and grades itself every night.
In one minute
What a trading bot is, if you have only traded by hand
Process · September to October 2026
Obedient, smart, smarter, smartest
Each level learned what the last could not do, built on top of it, and the tests kept count.
Built from scratch
A backtester that counts every rupee
Before a strategy touches money, it is replayed on years of old prices, with every Zerodha charge taken off, and then questioned.
The Pine Script builder
Got a new strategy? Paste it in. Two clicks, and it’s in the bot.
TradingView strategies are written in Pine Script, which only TradingView can run. So I gave the bot its own reader: paste the script, press Check, press Save.
Where the AI is
Claude advises. The bot decides. Every call is scored.
Claude reads the news; the bot reads prices. Claude gets exactly as much say as it has earned by being right.
One morning, replayed
The bot noticed something odd and asked, by itself
It holds TATAMOTORS. The stock opens 4.8% down. Nobody told the bot to ask; the gap did.
Constraints and decisions
Built to be trusted with money
Real money behind a phone, run by an owner who is not an engineer. Four decisions make that safe.
Outcome
The effort, measured
- 19 of 19
- strategies rejected by my own gate
- 21
- trading rules, each measuring what it costs or saves
- 5,300+
- automated tests, in two weeks of building
- 0
- live trades. Live stays locked until a strategy earns it
No profit and loss, usage or live result to show. There is none yet, and I would rather say so than show a number.
Its day
A day, as the bot lives it
Seven moments from its own screens. The owner should be able to guess what it is doing at any hour.
08:45
It writes today’s plan

09:16
Something odd: it asks Claude, by itself

10:16
A trade closes at its target

12:22
Every open position carries its stop and target

16:31
Every call Claude made is scored

19:00
It picks tomorrow’s stocks, and grades itself

Saturday
It reviews its week, and what it changed

The bot’s own screens, from its test harness with made-up data
Looking back
Read the engine before drawing the screen. Half my complaints about the first interface were missing data, and a real browser run found six defects that 1,500 tests had passed.
Next: real days on paper before more cleverness. I built faster than I verified; a real paper week and a one-share live test come before anything gets a vote.