You would have to assign different weight on each trade - if you have 1.00 lot buy at price 1.000 and 0.01 lot buy at price 2.000, the midpoint is not price 1.500 but close to 1.000..
There could be a way to calculate this, with a million variables, but its not very simple 😄
Well, MT5 does this automatically, everytime...