Im trying to get the unrealized profit from a position with the below code.
From my understanding in the help guide this should only show the position for the instrument and account the strategy is run on.
However when running the below i see 2 values, so the end result is its always zero so cant use this, i thought i would only see one value of the current position?
Where am i going wrong?
unRealizedPnL = PositionAccount.GetUnrealizedProfitLoss(Performanc eUnit.Currency, marketDataUpdate.Last); Print("unRealizedPnL: " + unRealizedPnL);
Comment