@php $timelineDark = $dark ?? false; @endphp @if($history->isEmpty())
| Product | Instrument | Direction | Opened | Closed | Invested / Margin | Entry | Exit | Status | Realized P&L | Details |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ 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
|