@php $timelineDark = $dark ?? false; @endphp @if($history->isEmpty())
No trades found.
@else
@foreach($history as $row) @php $pnl = $row['realized_pnl']; $decimals = max(2, min(9, strlen(explode('.', rtrim(number_format((float)($row['entry_price'] ?? 0), 9, '.', ''), '0'))[1] ?? ''))); @endphp @endforeach
ProductInstrumentDirectionOpenedClosed Invested / MarginEntryExit StatusRealized P&LDetails
{{ ucfirst($row['product']) }} {{ $row['instrument'] }} {{ strtoupper($row['direction']) }} {{ $row['opened_at']?->format('M j, Y H:i:s') ?? '—' }} {{ $row['closed_at']?->format('M j, Y H:i:s') ?? '—' }} {{ $row['currency'] }} {{ number_format((float)$row['invested_amount'], 2) }} {{ $row['entry_price'] !== null ? number_format((float)$row['entry_price'], $decimals) : '—' }} {{ $row['exit_price'] !== null ? number_format((float)$row['exit_price'], $decimals) : '—' }} {{ ucfirst(str_replace('_', ' ', $row['status'])) }} {{ $pnl === null ? '—' : (((float)$pnl >= 0 ? '+' : '-') . $row['currency'].' '.number_format(abs((float)$pnl), 2)) }} @if(count($row['executions']) > 0)
{{ count($row['executions']) }} executions
@foreach($row['executions'] as $execution)
{{ $execution['traded_at']?->format('M j H:i:s') }} · {{ strtoupper($execution['side']) }} {{ rtrim(rtrim(number_format($execution['quantity'], 8), '0'), '.') }} @ {{ number_format($execution['price'], $decimals) }} {{ $execution['note'] ?: 'Market execution' }}
@endforeach
@else — @endif
@if(method_exists($history, 'hasPages') && $history->hasPages())
{{ $history->withQueryString()->links('pagination::bootstrap-5') }}
@endif @endif