{% extends "base.html" %} {% block title_suffix %} — History{% endblock %} {% block content %}

Trade History

{% if trades %}
Export CSV
{% for t in trades %} {% endfor %}
Date Asset Direction Entry Exit PnL ($) PnL (%) Reason Days
{{ t.entry_date }} {{ t.ticker }} {{ 'LONG' if t.direction == 1 else 'SHORT' }} ${{ "%.2f"|format(t.entry_price) }} ${{ "%.2f"|format(t.exit_price or 0) }} ${{ "%+.2f"|format(t.pnl_net or 0) }} {{ "%+.2f"|format(t.pnl_pct or 0) }}% {{ t.exit_reason or '' }} {% if t.entry_date and t.exit_date %} {{ (t.exit_date | string)[:10] }} {% endif %}
{% else %}

No trades yet.

{% endif %} {% endblock %}