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
| Window | Smoothness | Reaction speed | When it suits |
|---|---|---|---|
| 10 trades | Low | Fast | Very active traders, and even then it is noisy |
| 20 trades | Medium | Medium | A common starting point for daily review |
| 50 trades | High | Slow | Judging whether a method works at all |
| 100 trades | Very high | Very slow | Quarterly 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
- Average net per trade (also called expectancy in the plain sense: the mean result of a trade, see expected payoff explained). A line sliding below zero tells you the recent average trade loses money.
- Win rate. Useful, but read it with the average winner and loser. A falling win rate with a rising payoff can be perfectly healthy; see break-even win rate and payoff ratio.
- Average loss size. A rising line may mean you are widening stops or sizing up, which connects to position size changes.
- Cost per trade. Commission and swap rolled together show whether trading costs are creeping up; trading costs in history explains where they come from.
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 trade | Average net per trade | Win rate | Average loss |
|---|---|---|---|
| 20 | +2.10 | 55% | -8.00 |
| 40 | +1.60 | 52% | -8.30 |
| 60 | +0.40 | 50% | -9.10 |
| 80 | -0.90 | 46% | -10.40 |
| 100 | -1.30 | 44% | -11.20 |
| 120 | -0.20 | 49% | -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
- A rolling window needs enough trades; with under a hundred closed trades, even a 20-trade window is crude.
- Mixing instruments and setups in one window blends different behaviours; consider rolling per setup if you have the volume.
- Results depend on market conditions as well as your decisions.
- This is analysis of past trades, not a forecast and not advice.
Frequently asked questions
What window size should I use?
Is a rolling average the same as a moving average on a chart?
Should I roll by trades or by days?
Does a falling line mean I should stop?
Can I do this in Excel?
Related guides
- A local trading journal for MT5
- P&L calendar for MT5
- Trade notes, ratings and screenshots
- Trading progress and goals
- Back up your journal and move it to a new PC
- An offline trading journal for Windows
- How to set monthly trading goals
- Import your whole MT5 history
- How to tag trades
- Trade screenshots for your journal
- All trading journal comparisons
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