{% extends "base.html" %} {% block title %}Portfolio{% endblock %} {% block content %}

Portfolio & Aset

Gabungan seluruh aset crypto dan saham ALL ASSETS

Export JSON
Selected:
Total:
Fee (est):
Net:
{% if summary.count > 0 %}

Total Positions

{{ summary.count }}

Total Invested

Rp {{ summary.total_invested|idr }}

IDR (gabungan)

Current Value

Rp {{ summary.total_current|idr }}

Unrealized P&L

Rp {{ summary.total_unrealized|sidr }} ({{ summary.total_pnl_pct|spct2 }})

Realized P&L

Rp {{ summary.total_realized|sidr }}

{% if subtotals and (subtotals.crypto.count > 0 or subtotals.stock.count > 0 or subtotals.get('stock_us', {}).get('count', 0) > 0) %}
{% if subtotals.crypto.count > 0 %}
CRYPTO {{ subtotals.crypto.count }} posisi
Invested

Rp {{ subtotals.crypto.invested|idr }}

Value

Rp {{ subtotals.crypto.current|idr }}

Unrealized

Rp {{ subtotals.crypto.unrealized|sidr }} ({{ subtotals.crypto.pnl_pct|spct2 }})

{% endif %} {% if subtotals.stock.count > 0 %}
SAHAM IDX {{ subtotals.stock.count }} posisi
Invested

Rp {{ subtotals.stock.invested|idr }}

Value

Rp {{ subtotals.stock.current|idr }}

Unrealized

Rp {{ subtotals.stock.unrealized|sidr }} ({{ subtotals.stock.pnl_pct|spct2 }})

{% endif %} {% if subtotals.get('stock_us', {}).get('count', 0) > 0 %}
SAHAM US {{ subtotals.stock_us.count }} posisi
Invested

$ {{ subtotals.stock_us.invested_usd|idr2 if subtotals.stock_us.invested_usd else subtotals.stock_us.invested|idr }}

Value

$ {{ subtotals.stock_us.current_usd|idr2 if subtotals.stock_us.current_usd else subtotals.stock_us.current|idr }}

Unrealized

$ {{ subtotals.stock_us.unrealized_usd|idr2 if subtotals.stock_us.unrealized_usd else '0' }} ({{ subtotals.stock_us.pnl_pct|spct2 }})

~Rp {{ subtotals.stock_us.current|idr }} (IDR equiv.)

{% endif %}
{% endif %} {% endif %} {% if portfolio_items %}

Posisi Aktif

{% for item in portfolio_items %} {% set cs = '$ ' if item.asset_type == 'stock_us' else 'Rp ' %} {% endfor %}
{{ item_label }} Qty Avg Buy Current Value Unrealized P&L Realized P&L Actions
{% set _ic = coin_icon(item.coin) if item.coin else None %} {% if _ic %} {{ item.asset_id }} {% else %} {{ (item.asset.symbol[:1] if item.coin else '?') }} {% endif %} {{ item.asset.symbol|upper if item.coin else item.asset_id }} {% if item.asset_type == 'stock_us' %} US {% elif item.asset_type == 'stock' %} IDX {% else %} CRYPTO {% endif %} {{ item.quantity|idr8 }}{{ cs }}{{ item.avg_buy_price|price }} {{ cs }}{{ item.current_price|price }} {{ cs }}{{ item.current_value|idr }} {{ cs }}{{ item.unrealized_pnl|sidr }} ({{ item.pnl_pct|spct2 }}) {{ cs }}{{ item.realized_pnl|sidr }} Analyze Timeline
{% else %}

Belum ada posisi di portofolio

Tambah trade manual di atas, atau generate timeline lalu eksekusi.

Go to Timeline
{% endif %}

Antrian Aktif (Belum Dieksekusi)

{% if queues_by_coin %} {% for asset_id, entries in queues_by_coin.items() %}
{% set coin = entries[0].coin %} {% set _ic2 = coin_icon(coin) if coin else None %} {% if _ic2 %} {% else %} {{ (coin.symbol[:1] if coin else '?') }} {% endif %} {{ coin.symbol|upper if coin else asset_id }} {% if coin and coin.asset_type == 'stock_us' %} US {% elif coin and coin.asset_type == 'stock' %} IDX {% elif coin %} CRYPTO {% endif %} {{ coin.name if coin else '' }} {{ entries|length }} entries
{{ entries[0].prediction_date }}
{% for entry in entries %}
#{{ entry.sequence_num }}
{{ entry.action }} {% set eqs = '$ ' if coin and coin.asset_type == 'stock_us' else 'Rp ' %} {{ eqs }}{{ entry.predicted_price|price }} x {{ entry.quantity|idr8 }}
{% if entry.reason %}

{{ entry.reason }}

{% endif %}
Cash: {{ eqs }}{{ entry.cash_amount|idr }}
Fee: {{ eqs }}{{ entry.fee_amount|idr }}
{% if entry.profit %}
Profit: {{ eqs }}{{ entry.profit|sidr }}
{% endif %} {% if entry.confidence %}
Confidence: {{ entry.confidence|pct }}
{% endif %} {% if entry.accumulated_units %}
Accum Units: {{ entry.accumulated_units|idr8 }}
{% endif %}
{% endfor %}
{% endfor %} {% else %}

Tidak ada antrian aktif

Generate timeline untuk membuat antrian beli/jual

Go to Timeline
{% endif %}
{% if recent_trades %}

Riwayat Trade Terbaru

{% for t in recent_trades %} {% set tc = trade_coins.get(t.asset_id) %} {% set tcs = '$ ' if tc and tc.asset_type == 'stock_us' else 'Rp ' %} {% endfor %}
Time {{ item_label }} Side Price Qty Value Fee P&L
{{ t.executed_at|wib_short }} {% set _ic3 = coin_icon(tc) if tc else None %} {% if _ic3 %} {% endif %} {{ tc.symbol|upper if tc else t.asset_id }} {% if tc and tc.asset_type == 'stock_us' %} US {% elif tc and tc.asset_type == 'stock' %} IDX {% elif tc %} C {% endif %} {% if t.is_simulation %} SIM {% endif %} {{ t.side }} {{ tcs }}{{ t.price|price }} {{ t.quantity|idr8 }} {{ tcs }}{{ t.total_value_idr|idr }} {{ tcs }}{{ t.fee_idr|idr }} {% if t.pnl_idr %}{{ tcs }}{{ t.pnl_idr|sidr }}{% else %}-{% endif %}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}