mirror of
https://github.com/BrentNeale1/fx-quant.git
synced 2026-07-28 02:47:47 +00:00
0cf9c90197
Replaces legacy config display with Phase 2 engine info: strategy slots table, starting equity, max daily DD, poll interval. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
124 lines
3.7 KiB
HTML
124 lines
3.7 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}fx-quant — Status{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
<!-- Mode & Engine Status -->
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header"><strong>Trading Status</strong></div>
|
|
<div class="card-body">
|
|
<table class="table table-borderless mb-0">
|
|
<tr>
|
|
<td>Mode</td>
|
|
<td><strong>{{ "PAPER" if cfg.phase2.paper_mode else "LIVE" }}</strong></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Poll Interval</td>
|
|
<td>{{ cfg.phase2.poll_interval_seconds }}s</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Starting Equity</td>
|
|
<td>${{ "{:,.0f}".format(cfg.phase2.starting_equity) }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Max Daily DD</td>
|
|
<td>{{ cfg.phase2.max_daily_drawdown_pct }}%</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Kill Switch -->
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header"><strong>Kill Switch</strong></div>
|
|
<div class="card-body text-center">
|
|
{% if kill_active %}
|
|
<p class="kill-active d-inline-block mb-3">KILL SWITCH ACTIVE</p>
|
|
<form method="post" action="/killswitch">
|
|
<input type="hidden" name="action" value="deactivate">
|
|
<button class="btn btn-success btn-lg" onclick="return confirm('Resume trading?')">
|
|
Deactivate Kill Switch
|
|
</button>
|
|
</form>
|
|
{% else %}
|
|
<p class="kill-inactive d-inline-block mb-3">Trading Active</p>
|
|
<form method="post" action="/killswitch">
|
|
<input type="hidden" name="action" value="activate">
|
|
<button class="btn btn-danger btn-lg" onclick="return confirm('STOP ALL TRADING?')">
|
|
Activate Kill Switch
|
|
</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Strategy Slots -->
|
|
<div class="card mt-3">
|
|
<div class="card-header"><strong>Strategy Slots</strong></div>
|
|
<div class="card-body p-0">
|
|
<table class="table table-sm table-striped mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Slot</th><th>Strategy</th><th>Pair</th><th>Timeframe</th><th>HTF</th><th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for s in cfg.phase2.strategies %}
|
|
<tr>
|
|
<td>{{ loop.index }}</td>
|
|
<td>{{ s.name }}</td>
|
|
<td>{{ s.pair }}</td>
|
|
<td>{{ s.timeframe }}</td>
|
|
<td>{{ s.htf_timeframe | default("—", true) }}</td>
|
|
<td>
|
|
{% if s.enabled %}
|
|
<span class="badge bg-success">Enabled</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">Disabled</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Recent Activity -->
|
|
<div class="card mt-3">
|
|
<div class="card-header"><strong>Recent Activity</strong> (last 10 orders)</div>
|
|
<div class="card-body p-0">
|
|
{% if recent_orders %}
|
|
<table class="table table-sm table-striped mb-0">
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th><th>Instrument</th><th>Side</th><th>Units</th>
|
|
<th>Price</th><th>Mode</th><th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in recent_orders | reverse %}
|
|
<tr>
|
|
<td>{{ row[0][:19] }}</td>
|
|
<td>{{ row[1] }}</td>
|
|
<td>{{ row[2] }}</td>
|
|
<td>{{ row[3] }}</td>
|
|
<td>{{ row[4] }}</td>
|
|
<td>{{ row[6] }}</td>
|
|
<td>{{ row[7] }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="p-3 text-muted mb-0">No orders yet.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|