Aggregated view average entry price (which includes commissions) is different to coded version (which doesn't include commissions)
12 Sep 2023, 01:30
the Position window in "aggregated view" shows Average entry price for a symbol - and this seems to include the cost of commissions both ways.
However when I use the following code:
double AverageEntry = Positions.Where(x => x.SymbolName == Symbol.Name).Average(i => i.EntryPrice);
this price does not include the cost of commissions.
How do I get the Average entry price that displays in the aggregated view for a particular symbol?