mirror of
https://github.com/chrisnov-it/quantumbotx.git
synced 2026-07-27 18:57:47 +00:00
5b41fdea95
- Streamlined .env.example to include only essential Flask and MT5 configs for production environments - Added .vercel directory to .gitignore for clean Vercel deployments - Enabled internationalization by adding data-i18n attributes to strategy switcher UI elements - Updated MT5 setup guide and roadmap documentation for clarity and current focus This change simplifies configuration for server deployment while enhancing UI accessibility across languages.
57 lines
3.0 KiB
HTML
57 lines
3.0 KiB
HTML
<!-- templates/portfolio.html -->
|
|
{% extends "base.html" %}
|
|
{% block title_key %}portfolio.title{% endblock %}
|
|
{% block title %}Portfolio Real-Time{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="flex justify-between items-center mb-6">
|
|
<div>
|
|
<h2 class="text-2xl font-bold text-gray-800" data-i18n="portfolio.title">Portfolio Real-Time</h2>
|
|
<p class="text-gray-600" data-i18n="portfolio.description">Posisi trading yang sedang terbuka di akun MetaTrader 5.</p>
|
|
</div>
|
|
<div id="portfolio-summary" class="text-right">
|
|
<!-- Summary akan dimuat di sini -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid untuk menampung dua chart -->
|
|
<div class="grid grid-cols-1 lg:grid-cols-5 gap-6 mb-6">
|
|
<!-- Chart P/L (lebih lebar) -->
|
|
<div class="lg:col-span-3 bg-white rounded-lg shadow p-4">
|
|
<h3 class="text-lg font-semibold text-gray-800 mb-2" data-i18n="portfolio.pnl_chart">Grafik Profit/Loss Terbuka (Real-Time)</h3>
|
|
<div style="height: 250px;"><canvas id="pnlChart"></canvas></div>
|
|
</div>
|
|
|
|
<!-- Chart Alokasi Aset (lebih kecil) -->
|
|
<div class="lg:col-span-2 bg-white rounded-lg shadow p-4">
|
|
<h3 class="text-lg font-semibold text-gray-800 mb-2" data-i18n="portfolio.allocation_chart">Alokasi Aset</h3>
|
|
<div style="height: 250px;"><canvas id="assetAllocationChart"></canvas></div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Tabel Posisi Terbuka -->
|
|
<table class="min-w-full bg-white rounded-lg shadow overflow-hidden">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.symbol">Simbol</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.type">Tipe</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.volume">Volume</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.open_price">Harga Buka</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.profit_loss">Profit/Loss</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" data-i18n="portfolio.magic">Magic Number</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="portfolio-table-body" class="bg-white divide-y divide-gray-200">
|
|
<tr><td colspan="6" class="p-4 text-center text-gray-500" data-i18n="portfolio.loading">Memuat posisi terbuka...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<!-- Library Chart.js utama, adapter, dan skrip halaman dimuat bersamaan -->
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.bundle.min.js"></script>
|
|
<script src="{{ url_for('static', filename='js/portfolio.js') }}"></script>
|
|
{% endblock %}
|