{{-- Profile Recent Trades — last 15 trades from forProfile()['recent_trades']. Receives: $trades : array — list of trade arrays with product, market, bid, sell, profit, outcome, at --}} @php $hasTrades = !empty($trades); @endphp

Recent trades

@if($hasTrades) {{ count($trades) }} most recent @endif
@if($hasTrades)
@foreach($trades as $t) @php $isWin = $t['outcome'] === 'won'; $profit = (float) $t['profit']; $profitStr = $isWin ? '+$' . number_format(abs($profit), 2) : '—'; $timeAgo = $t['at'] ? \Carbon\Carbon::parse($t['at'])->diffForHumans(null, true) . ' ago' : '—'; $product = (string) ($t['product'] ?? 'Trade'); @endphp
{{ $product }}
{{ $t['market'] ?: '--' }} · {{ $timeAgo }}
Bid
${{ number_format((float) $t['bid'], 2) }}
Sell
@if($isWin) ${{ number_format((float) $t['sell'], 2) }} @else @endif
P&L
{{ $profitStr }}
@endforeach
@else
This pilot has no settled trades yet.
@endif