@if($positions->isEmpty() && $leveragedOpen->isEmpty())
| Type | Trade ID | Opened | Instrument | Direction | QTY / UNITS | Entry | Current | Value | P&L | Protection | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Asset | {{ $pos->public_trade_id }} | @include('portal.partials.symbol-icon', ['symbol' => $pos->symbol]) {{ $pos->symbol->name ?? '-' }} {{ $pos->symbol?->display_symbol ?? '—' }} |
LONG | {{ rtrim(rtrim(number_format($pos->quantity, 8), '0'), '.') }} | {{ number_format($pos->avg_price, $pos->symbol->decimal_places ?? 2) }} | {{ $lp > 0 ? number_format($lp, $pos->symbol->decimal_places ?? 2) : '—' }} | {{ $lp > 0 ? '$'.number_format($val, 2) : '—' }} | @if($lp > 0){{ ($pnl >= 0 ? '+' : '').number_format($pnl, 2) }} ({{ ($pnlPct >= 0 ? '+' : '').number_format($pnlPct, 2) }}%)@else — @endif |
— | Trade | |
| Leveraged | {{ $position->public_trade_id }} | @php $leveragedOpenedAt = $position->opened_at ?? $position->created_at; @endphp | @include('portal.partials.symbol-icon', ['symbol' => $position->symbol]) {{ $position->symbol->name ?? '-' }} {{ $position->symbol?->display_symbol ?? '—' }} |
{{ strtoupper($position->direction) }}{{ $position->leverage }}× | {{ rtrim(rtrim(number_format($leveragedUnits, 8), '0'), '.') }} | {{ number_format($position->entry_price, $leveragedDecimals) }} | {{ $leveragedCurrent > 0 ? number_format($leveragedCurrent, $leveragedDecimals) : '—' }} | USD {{ number_format($position->exposure, 2) }} | USD {{ number_format($leveragedPnl, 2) }} | ||
|
Balance: {{ $summaryMoney($summary['balance']) }}
Credit: {{ $summaryMoney($summary['credit']) }}
Equity: {{ $summaryMoney($summary['equity']) }}
Margin: {{ $summaryMoney($summary['margin']) }}
Margin level: {{ $summary['margin_level'] === null ? 'N/A' : number_format($summary['margin_level'], 2).'%' }}
Free margin: {{ $summaryMoney($summary['free_margin']) }}
P&L: {{ ($summary['unrealized_pnl'] >= 0 ? '+' : '-') . $summaryMoney(abs($summary['unrealized_pnl'])) }}
|
|||||||||||