To find the unrealised P/L of open positions I use the following...
UnRe0 = Positions[0].GetProfitLoss(Closes[0][0], PerformanceUnit.Currency);
UnRe1 = Positions[1].GetProfitLoss(Closes[1][0], PerformanceUnit.Currency);
UnRe2 = Positions[2].GetProfitLoss(Closes[2][0], PerformanceUnit.Currency);
etc.
Each instrument enters and exits independently in the same script, so how do I find the realised P/L of each instrument after it has closed out?
Thx!
Comment