Rolling average of trade results: see drift, not noise, in your MT5 history

Use a moving window over your last N closed trades to tell a real change in performance from an ordinary bad week.

A single losing week can feel like a collapse, and a single winning week can feel like proof. Both feelings come from looking at too short a window. A rolling average smooths the noise by looking at your last N trades at every point, so you can see whether performance is genuinely drifting or only wobbling. This page shows how to build a rolling window from your MT5 closed-trade history and how to read it with suitable doubt.

What a rolling window is

Take your closed trades in the order they closed. The rolling average at trade 20 is the average of trades 1 to 20. At trade 21 it is the average of trades 2 to 21, and so on, always the latest twenty. Plot those values and you get a line that moves slowly. A sudden spike in one trade barely moves it, but a sustained change in your results bends it clearly. You can do the same with win rate, average net result per trade, or average loss, and each tells a different story.

Prepare the data

Use one row per closed position, sorted by close time. If you count deals instead of positions, every trade appears twice and the window covers half as many real trades, which is the confusion described in positions versus deals. Copy the rows with the method in sorting, filtering and copying history rows. If your history includes balance rows for deposits and withdrawals, remove them before you calculate, as explained in balance and deposit rows in history; they are not trades.

Pick a window size

WindowSmoothnessReaction speedWhen it suits
10 tradesLowFastVery active traders, and even then it is noisy
20 tradesMediumMediumA common starting point for daily review
50 tradesHighSlowJudging whether a method works at all
100 tradesVery highVery slowQuarterly or half-yearly view for a steady trader

There is no best window. A short one reacts quickly but misleads easily, a long one is trustworthy but tells you late. Many traders look at two at once: a short window to notice change and a long one to anchor the picture.

Which measures to roll

A worked example (hypothetical)

The figures are invented to show how to read the line. They are not real results and not a benchmark. Imagine a 20-trade window sampled every 20 trades over a 120-trade history.

Window ending at tradeAverage net per tradeWin rateAverage loss
20+2.1055%-8.00
40+1.6052%-8.30
60+0.4050%-9.10
80-0.9046%-10.40
100-1.3044%-11.20
120-0.2049%-9.50

The picture: a gradual decline through trade 100, with the average loss growing at the same time, then a partial recovery. Growing losses together with a falling win rate is a different problem from a falling win rate alone, because it suggests stops or size changed. The useful next step is to open the trades between 60 and 100, read your notes and compare setups, as in win rate by setup. It might be a market change, a new setup you were testing, or loosened discipline. The line cannot say which; your notes can.

Do not mistake a window for a trend

A rolling average always lags, and consecutive windows share most of their trades, so points on the line are not independent. A smooth decline of ten points does not mean ten separate pieces of evidence. Also remember that drawing a window after a bad run and noticing the dip is a classic way to see patterns that are not there. Pair the line with the equity curve from your history: the equity curve shows the cumulative outcome, the rolling average shows the recent rate of change, and the two together are easier to trust than either alone.

AI Trading Journal is a Windows app for MetaTrader 5 only. It reads closed trades from the terminal on your PC, adds new ones every 5 minutes, and keeps the journal in a file in your Documents folder. The Progress page shows a growth curve and a months table, and the Excel export has a Trades tab with one row per closed trade, so you can add a rolling average column with a simple AVERAGE over the last N rows. The app does not calculate rolling windows itself. The app is read-only: it never places, modifies or closes a trade, and it gives no trading advice. The 7-day trial needs no card, and the full version is $19.99 once, with no subscription.

Limits

Frequently asked questions

What window size should I use?
Twenty trades is a common starting point for review, and fifty or more is better to judge a method. Use two sizes if you can.
Is a rolling average the same as a moving average on a chart?
The idea is the same, but here the series is your trade results in order, not price.
Should I roll by trades or by days?
By trades is simpler and treats busy and quiet days equally. By days suits traders with very uneven trade counts.
Does a falling line mean I should stop?
It means look closer. Read the notes on those trades and check for size, setup or market changes before deciding anything.
Can I do this in Excel?
Yes. Copy the closed trades in close order and use an AVERAGE over the last N rows in a new column.

Related guides

Track your trades the easy way: free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial