NineFifteenAM

Best practices

How I analyse my trading bot's trades: putting the trade journal to work

7 min readBy NineFifteenAM

The trade journal is the most important part of a trading bot, but only if you ask it good questions. These are the ones I ask my bot's trades: where stops belong, what exits give back, what fills cost, and whether the filters earn their place.

Short answer

I start with how trades behaved rather than how much they made: how far they went against me before working out, how far they went in my favour, how much of that I kept, and what the fills cost. Then I split the trades by market conditions, time of day and days to expiry, check whether my filters and exit warnings were right, and line results up against every change I made. The useful answers almost always come from comparing groups of trades, not from staring at single ones.

In part 1, I argued that the trade journal is the most important part of any algo trading bot, and described what mine records for every trade: the reason, the market around it, the fill, the path while it was open, and the exit, plus the decisions it didn't act on and every change I made.

Ten thousand rows of that don't give you answers on their own. Questions do. These are the ones I ask, roughly in the order I ask them.

A note before starting: none of this is about finding a magic setting. It's about finding out which part of a trade is going wrong, so that the fix goes in the right place.

1. How did the trades behave, not just end?

The first thing I look at is not profit. It's the shape of the trades.

For every closed trade, the log has its worst point (MAE) and its best point (MFE). Put those side by side for winners and losers and a few things become visible very quickly:

This one comparison says more about where stops belong than any amount of looking at individual charts.

2. How much of the move did I keep?

The second question is about exits. For each trade I compare the best point it reached with where it actually closed. The difference is what it gave back.

Looked at across hundreds of trades, this shows whether the exit rule is doing its job:

Because the full price path is stored, I don't have to guess what a different exit would have done. I can replay a different rule on the same recorded trades and compare. That's far faster than waiting months for new trades, though a rule that only looks good on old trades still has to prove itself on new ones.

3. What did the fills cost?

Slippage is the difference between the price the signal wanted and the price the order actually got. It's easy to ignore, because each trade's slippage looks small. Added up, it can be the difference between a strategy that works and one that doesn't.

The questions I ask of it:

4. Does it work in every kind of market?

This is where the minute-by-minute market snapshots earn their keep. Each trade is joined to what the market looked like when it was taken, and then the trades are split into groups:

Then the same two numbers are compared across groups: the average trade, and the worst trades. A strategy that does well overall can be carrying one kind of day that loses steadily. Finding that group, and simply not trading it, is often worth more than any change to the strategy itself.

The trap is small groups. Slice the data finely enough and some slice will look amazing by chance. A pattern has to show up across many days, and ideally on trades that came after I spotted it, before I act on it.

5. Were the filters right?

Every filter and risk check blocks some trades. The question is whether it blocks the right ones.

Because blocked signals are recorded with the rule, the reason and the market at that moment, I can follow each one on the recorded prices as if it had been taken, and compare those "shadow trades" with the ones that went through:

The same idea works during a trade. The part of the bot that watches for exits records a hold, warn or exit call every few seconds — more than 200,000 of them so far. Lining those calls up with what the price did next shows whether a warning actually meant something, or was just noise.

6. Was it the strategy, or was it me?

When results change, the change log is the first place to look. Every switch between paper and live, every strategy turned on or off, every quantity change and every manual exit is there with a timestamp.

Two questions come out of it:

7. Can I trust the data?

Before any of the above, the data itself needs checking. These are the checks worth running:

Making the log easy to analyse later

A lot of this analysis will be done by scripts, and increasingly with an AI assistant writing the queries. Either way, the same few things make the data easy to work with:

What I'd do if I started again

If you haven't read it, part 1 covers what I record for every trade and why. For how the first strategy behind these trades was built and tested, see the opening range breakout in 25 versions.

Questions people ask me

What are MAE and MFE in trading?

MAE, maximum adverse excursion, is the furthest a trade moved against you while it was open. MFE, maximum favourable excursion, is the furthest it moved in your favour. Together they show how a trade behaved, not just how it ended, which makes them the most useful numbers for setting stops and judging exits.

How many trades do you need before you can trust an analysis?

There's no magic number, but small groups mislead. I treat any group of a few dozen trades as an anecdote, not a result, and I look for patterns that hold across many different days rather than a handful of big ones. The more ways you slice the data, the more proof a pattern needs.

Can an AI assistant analyse a trade journal?

It can help, if the data is clean: consistent field names and units, one row per trade, IDs that link related tables, and a short description of every field. It can write the queries and point out patterns quickly. The patterns still have to be checked on trades that came after, because anything, human or machine, can find shapes in noise.

trade analysistrading journalMAE and MFEslippagealgo tradingnifty options
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

28 Sept 2026
The most important part of any algo trading bot is its trade journalNot the strategy, not the broker API: the trade journal is what tells you why a bot wins or loses. Here's what mine records for each of its 10,700+ trades, and why.
Best practices
27 Sept 2026
Opening range breakout on Nifty: I tested 25 versionsMy first trading bot traded one classic idea, the opening range breakout. I built 25 versions of it on Nifty options. Here's what made the good ones good.
The journey
27 Sept 2026
GPT vs Claude in a live trading bot: letting two AIs voteI asked GPT and Claude to read the same Nifty chart thousands of times and made them vote on my trades. What I learned about using AI in a trading bot.
The journey