NineFifteenAM

The journey

Six months building an options trading bot: what the log actually shows

4 min readBy NineFifteenAM

From one opening-range strategy to 157 strategies, 390+ commits and 10,500 logged trades — the real timeline of building a trading bot for Indian index options, including the week I multiplied my size by 27.

Short answer

Six months in, the bot has grown from a single opening-range strategy into a system that runs over a hundred strategies side by side. Most of them trade on paper; a small set is allowed to trade real money through a rule-based gate. The biggest lessons came from the gap between paper and live, not from strategy design.

This site is named after 9:15 AM, the moment the NSE opens and my bot wakes up. Before I write about individual bugs and rules, here is the whole six months in one place, taken from the repository history and the bot's own trade log rather than from memory.

Where it started

The first prototype, in late February 2026, did one thing: it watched the opening range on NIFTY and traded options on a breakout. A GPT model sat beside it and suggested entry triggers, and the dashboard had a button labelled "Ask GPT now" for when I wanted a second opinion mid-candle.

It broke in instructive ways almost immediately. On days with a very wide opening range, the AI's triggers were clamped to the edges of that range — levels the market never reached. One session logged more than 33 consecutive signals, every one of them untradeable. That was my first lesson that a clever component inside a naive frame is still naive.

In mid-March I rewrote it — the six months in the title count from here. That rewrite is where the git history starts, and the second day's commit added the most important button on the dashboard: a toggle between live and paper mode.

The numbers so far

As of late September 2026:

I deliberately don't publish returns. The counts above are there so you know this is a working system with a real history, not a weekend project.

The week I multiplied my size by 27

On Sunday, 28 June, I raised the quantity on every strategy at once — from one lot to twenty-seven. On Monday evening I reverted all of it, switched several strategies back to paper, and added a rule that only one live trade may be open at a time. On Tuesday I built a broker-level kill switch that flattens every position if total loss crosses a fixed limit, and stays tripped for the rest of the day.

I'm including this because it is the most honest thing in the log. Nothing in the code told me to do it. Confidence did. The guards that exist today were mostly written in the 48 hours after a decision like that one.

July: a strategy explosion, mostly on paper

July was research. I ported two open-source strategy collections — twenty strategies from one and twenty-five from another — added classics like a Turtle breakout, and built a dozen variants of the original opening-range idea. Almost all of them ran on paper.

That is also when paper trading paid for itself. One strategy family fell into a loop: stop out, re-enter immediately on the same signal, stop out again. Over two weeks on paper it lost a little over ₹1 lakh, with sixteen stop-loss exits that never once won. The fix was five re-entry guards — a cooldown after any exit, a longer lockout after a stop-loss, a daily cap on stop-outs, and a rule that the signal must go away and come back before re-arming. Had that strategy been live, the lesson would have cost real money.

In the same month I built a replay engine that runs the actual live strategy code against past sessions. I should have built it first. Why my backtest lied covers what it exposed.

August: the gate between paper and live

By August the question was no longer "which strategy" but "which trades are allowed to be real". I built a live gate: every strategy trades on paper by default, and a set of written rules decides when a given trade is routed to the broker instead. When a rule references data the bot can't supply at that moment, the trade goes to paper. The system fails closed.

August also produced the most expensive routing bug so far, a strategy I had switched to paper that kept placing real orders. It cost ₹15,947 and has its own post.

Other guards from that month:

September: the plumbing bites back

The most recent week's work was not strategy at all. The broker changed its API rate limits, the dashboard froze, and I spent the day on request throttling. Six months in, that is typical: the strategy code changes least. Routing, data, logging and limits change most.

What I would do differently

  1. Build replay before any strategy. Every week without it was a week of guessing.
  2. Write the guards before raising size, not after. The kill switch arrived the day after I needed it.
  3. Run fewer strategies, and check that each one actually trades. One of mine never took a single trade and I didn't notice. Seven bugs that never threw an error.
  4. Keep paper trading longer than feels necessary. It is the cheapest teacher I've had.

The next posts go through these one at a time, with the log lines and rupee figures attached.

Questions people ask me

How long does it take to build an algo trading bot?

A first version that places orders can take a few weeks. A version you can trust with real money takes much longer, because most of the work is in logging, replay, risk guards and routing between paper and live — not in the strategy itself.

Should I paper trade my algo before going live?

Yes, and for longer than feels necessary. In my case about 96% of all logged trades were paper. Paper trading caught a stop-loss re-entry loop that lost a little over ₹1 lakh in two weeks without costing me a rupee.

How many strategies should a trading bot run?

Fewer than you think at the start. Running many strategies is useful for research, but each one adds code that can fail quietly. One of mine never took a single trade because of a bug, and I did not notice for weeks among the others.

journeyalgo tradingoptionspaper tradingrisk
N

NineFifteenAM

One trader building an options bot for Indian index markets since early 2026. I write down how it is built, what broke, and what it cost — no tips, no calls, no returns.

Related

26 Sept 2026
Why my backtest lied: six gaps between testing and live tradingUnrealistic fills, tick-level trailing stops, the wrong bar timeframe, expiry-day strikes and candle-close entries — the specific ways my trading bot's backtests disagreed with live trading, and the replay engine I built to close the gap.
The journey
24 Sept 2026
I switched a strategy to paper. Thirty-three seconds later it traded real money.A live-routing bug in my trading bot let a rule outrank my manual paper switch. It cost ₹15,947, and fixing it exposed a second bug that could have sold a paper position on the real broker.
Mistakes that cost me
26 Sept 2026
Algo trading in India: the rules, the cost, and what to do firstWhat the law requires of a retail algo trader in India, what a system costs to run after the April 2026 STT change, and the order to build it in.
Guides