switch (lastPanelPnlUnit)
{
case PerformanceUnit.Currency:
tbPositionPnL.Text = position.GetUnrealizedProfitLoss(LastPanelPnlUnit, marketData.LastTradePrice).ToString("C2",Core.Glob als.GeneralOptions.CurrentCulture);
break;
case PerformanceUnit.Percent:
tbPositionPnL.Text = position.GetUnrealizedProfitLoss(LastPanelPnlUnit, marketData.LastTradePrice).ToString("P2", Core.Globals.GeneralOptions.CurrentCulture);
break;
case PerformanceUnit.Pips:
tbPositionPnL.Text = Math.Round(position.GetUnrealizedProfitLoss(Perfor manceUnit.Pips, marketData.LastTradePrice)).ToString(Core.Globals. GeneralOptions.CurrentCulture);
break;
case PerformanceUnit.Points:
tbPositionPnL.Text = Math.Round(position.GetUnrealizedProfitLoss(LastPa nelPnlUnit, marketData.LastTradePrice)).ToString(Core.Globals. GeneralOptions.CurrentCulture);
break;
case PerformanceUnit.Ticks:
tbPositionPnL.Text = Math.Round(position.GetUnrealizedProfitLoss(LastPa nelPnlUnit, marketData.LastTradePrice)).ToString(Core.Globals. GeneralOptions.CurrentCulture);
break;
}
Comment