MT5 netting accounts: how the average entry price is calculated

Adding to a netting position changes its price. See the formula, a worked example and how to audit the number yourself.

On a netting account in MetaTrader 5 you hold at most one position per symbol, so every extra buy or sell on that symbol changes the position instead of creating a new one. The price shown for the position is then an average, and the average moves each time you add or reduce. Understanding that number matters if you scale into trades, if you compare your fills with a plan, or if you wonder why a position that looks profitable on the chart shows a small loss. This page explains how the average entry price is formed, what happens to it when you reduce the position, and how to reproduce it in a spreadsheet.

One position, many fills

If you buy 0.50 lots at one price and another 0.50 lots at a higher price, a hedging account shows two positions with their own prices. A netting account merges them into one position of 1.00 lot. The price on that position is the volume-weighted average of the fills. The history still records each fill as its own deal, so the deal list and the position list answer different questions. The difference between the two account models is covered in hedging versus netting, and you can check which type you have using account types and your trade history.

The average price formula

When you add volume in the same direction, the new average is the sum of price times volume for every entry, divided by the total volume. For two fills it is the first price times the first volume, plus the second price times the second volume, all divided by the combined volume. The platform rounds the result to the number of digits of the symbol, so a spreadsheet may differ in the last decimal. That is a rounding difference, not an error.

FillVolume (lots)PriceRunning volumeAverage price
Buy 10.501.10000.501.1000
Buy 20.301.10400.801.1015
Buy 30.201.09801.001.1006

The prices in the table are invented to show the arithmetic. After the second buy the average is (0.50 times 1.1000 plus 0.30 times 1.1040) divided by 0.80, which is 1.1015. After the third it is 1.1006 when rounded to four digits. Notice that the third fill, which was at a lower price, pulled the average down.

What happens when you reduce the position

Reducing a position does not change the average entry price of what is left. If you sell 0.40 lots from the 1.00 lot position above, the remaining 0.60 lots still carry the same average price. What changes is the realised profit: the platform books the result on the 0.40 lots against that average. This is why on a netting account the profit of a partial exit depends on every earlier entry, and why it can feel different from a hedging account where you pick which position to close. The recording of the steps is described in partial closes in history.

If you sell more than you hold, you reverse. The old position is closed at the average, and a new position starts at the price of the excess volume. That case is explained in position reversal on netting accounts.

Why this matters for your review

Rebuilding the average in a sheet

Copy the entry deals for one position into a spreadsheet, as shown in sorting, filtering and copying rows. Add a column for volume times price. The average at any row is the running sum of that column divided by the running sum of volume. For exits, stop adding to the sums and keep the last average. If a position was reversed, start a fresh set of sums at the reversing deal. This is enough to audit a result, and it makes clear how much of the outcome came from the first idea and how much from adding.

A worked example (hypothetical)

A trader buys 0.50 lots at 100.00, adds 0.50 lots at 98.00 and holds 1.00 lot with an average of 99.00. The trader then sells 1.00 lot at 100.50. The result on the position is 1.50 per unit of volume against the average, even though the second fill was in profit by 2.50 and the first by only 0.50 per unit. Looking at the exit alone, the trade appears to have been closed 0.50 above the first entry, which hides the effect of the add. The numbers are invented and not advice.

What the journal app does

AI Trading Journal, a Windows app for MetaTrader 5 only, keeps one entry per closed position with the result as profit plus commission plus swap. It does not recompute your average entry price or store every fill as a separate line, so if the way you added matters to you, write the fills in the notes field of the entry. The app is read-only and the journal is a file on your own PC.

Limits and cautions

Frequently asked questions

How is the average price of a netting position calculated?
It is the volume-weighted average of all fills in the same direction, rounded by the platform to the symbol’s digits.
Does selling part of a position change the average entry price?
No. The remaining volume keeps its average; the realised profit is booked against that average.
Why is my profit different from what the chart suggests?
Because the position’s entry price is an average of all fills, and spread and slippage on each fill also count.
Do hedging accounts average too?
No. Each position keeps its own price, so you see separate rows.
Can the journal app show each fill?
It keeps one entry per closed position. You can note the fills in the entry notes.

Related guides

Keep every closed trade in one local journal: 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