I'm having problems getting the realtime PnL of my operations... In the way I'm trying to do that, I'm getting a wrong value:
protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{
if (Position.MarketPosition != MarketPosition.Flat)
{
double currentProfit = Position.GetUnrealizedProfitLoss(PerformanceUnit.C urrency, Closes[0][0]);
}
}
In the major cases that currentProfit is not the real PnL obtained by the entry...
Comment