@extends('dashboard.user.layouts.app') @section('content')

{{ $title }}

Top Traders

Browse our top-performing traders and start copying their trades to earn profits automatically.

@if (!$traders->isEmpty())
@foreach ($traders as $trader) @php $pnl = $trader->sevenDayPnl(); $pnlColor = $pnl >= 0 ? '#10b981' : '#ef4444'; $pnlSign = $pnl >= 0 ? '+' : ''; $performances = $trader->recentPerformances; // Build sparkline data points $points = []; if ($performances->count() > 0) { $cumulative = 0; foreach ($performances as $perf) { $val = (float) $perf->roi_percentage; $cumulative += $perf->direction->value === 'up' ? $val : -$val; $points[] = $cumulative; } } @endphp
{{ @$trader->user->name }}
{{ @$trader->user->name }}
{{ $trader->experience->label() }}
7d PnL {{ $pnlSign }}{{ number_format(abs($pnl), 2) }}%
@if (count($points) > 1) @php $minVal = min($points); $maxVal = max($points); $range = $maxVal - $minVal; if ($range == 0) { $range = 1; } $width = 200; $height = 45; $padding = 2; $svgPoints = []; $count = count($points); for ($i = 0; $i < $count; $i++) { $x = $padding + ($i / ($count - 1)) * ($width - 2 * $padding); $y = $height - $padding - (($points[$i] - $minVal) / $range) * ($height - 2 * $padding); $svgPoints[] = round($x, 1) . ',' . round($y, 1); } $polyline = implode(' ', $svgPoints); // Fill area: close the polygon $fillPoints = $polyline . ' ' . round($width - $padding, 1) . ',' . $height . ' ' . $padding . ',' . $height; @endphp @else
No chart data
@endif
Balance {{ currency(@$trader->user->currency) . formatAmount($trader->balance) }}
Status {{ $trader->status->label() }}
@if (!in_array($trader->id, $userRequestTraderIds))
@csrf
@else View Trader @endif
@endforeach
@else

No active traders are available at the moment. Once new professional traders join the platform, they will appear here for copy trading.

@endif
@endsection