@foreach (var assetStat in portfolioStats.AssetStatistics.OrderByDescending(a => a.NetProfit))
{
var config = BotService.AssetConfigurations.TryGetValue(assetStat.Symbol, out var c) ? c : null;
if (config == null) continue;
var currentValue = config.CurrentBalance + (config.CurrentHoldings * assetStat.CurrentPrice);
@assetStat.Symbol@assetStat.Name
$@currentValue.ToString("N2")
$@assetStat.NetProfit.ToString("N2")
@config.ProfitPercentage.ToString("F2")%
@assetStat.TotalTrades
@assetStat.WinRate.ToString("F1")%
}
}
else
{
var assetStats = BotService.AssetStatistics.TryGetValue(selectedSymbol, out var stats) ? stats : null;
var assetConfig = BotService.AssetConfigurations.TryGetValue(selectedSymbol, out var config) ? config : null;
@if (assetStats != null && assetConfig != null)
{