Letzte Trades: 5 -> 10 (User-Wunsch)
Zwei unabhaengige Begrenzungen mussten mitgezogen werden: - engine.snapshot -> history.last_closed_trades(5) -> (10) - app.js -> slice(0, 5) -> slice(0, 10) Nur eine davon zu aendern haette still weiter 5 gezeigt; beide sind jetzt gegenseitig im Kommentar vermerkt. Verifiziert: Snapshot liefert 10 Trades, v=135 ausgeliefert. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1c976cc8fd
commit
33b6b8f629
@@ -2503,7 +2503,7 @@ dort bereits nachvalidiert, ØR +0,305.) **Eine** Oberfläche:
|
||||
Signal → **Hinweis-Dialog „trotzdem eröffnen?"** (überschreibbar). CLOSE bei
|
||||
**negativem** P&L → Sicherheitsabfrage; im Plus/Breakeven direkt. Sonst keine
|
||||
Token-Dialoge (`require_token=false`). Audio braucht 1× Nutzer-Tap.
|
||||
- Asset-Version aktuell **v=134** (in `web/index.html` hochzählen, siehe Workflows).
|
||||
- Asset-Version aktuell **v=135** (in `web/index.html` hochzählen, siehe Workflows).
|
||||
Schriftgrößen 2026-07-24 global **+4px** (2× je +2px auf User-Wunsch; Body-Basis
|
||||
14→18px). ⚠ Betrifft in `style.css` sowohl `font-size:Npx` (71×) ALS AUCH die
|
||||
`font:<weight> Npx/…`-**Shorthand** (3×: `.ms-chip`/`.ms-bos-lbl`/`.sqm-badge` —
|
||||
|
||||
+3
-1
@@ -3103,7 +3103,9 @@ class TradingEngine:
|
||||
|
||||
def snapshot(self) -> dict:
|
||||
try:
|
||||
last_trades = self.history.last_closed_trades(5)
|
||||
# 5 → 10 (User-Wunsch 2026-08-04). ⚠ Auch das `slice(0, 10)` in
|
||||
# `app.js` mitziehen — es begrenzt unabhängig davon nochmal.
|
||||
last_trades = self.history.last_closed_trades(10)
|
||||
except Exception as e:
|
||||
log.warning(f"last_closed_trades: {e}")
|
||||
last_trades = []
|
||||
|
||||
+4
-1
@@ -910,7 +910,10 @@ function render(d) {
|
||||
}
|
||||
|
||||
// ── Letzte Trades ───────────────────────
|
||||
const tds = (d.last_trades || []).slice(0, 5);
|
||||
// 5 → 10 (User-Wunsch 2026-08-04). Das Backend liefert bereits 10
|
||||
// (`engine.snapshot` → `last_closed_trades(10)`); dieser Slice ist die zweite,
|
||||
// unabhängige Begrenzung — beide müssen zusammenpassen.
|
||||
const tds = (d.last_trades || []).slice(0, 10);
|
||||
$("trades").innerHTML = tds.map(x => {
|
||||
const pnl = x.pnl || 0;
|
||||
const cls = pnl > 0 ? "up" : pnl < 0 ? "down" : "dim";
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
<meta name="theme-color" content="#0d1117">
|
||||
<title>Oil · MT5</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="stylesheet" href="style.css?v=134">
|
||||
<link rel="stylesheet" href="style.css?v=135">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Modul-Menü (ganz oben) -->
|
||||
@@ -259,6 +259,6 @@
|
||||
<div id="toast" class="toast hidden"></div>
|
||||
|
||||
<script src="lightweight-charts.standalone.production.js?v=114"></script>
|
||||
<script src="app.js?v=134"></script>
|
||||
<script src="app.js?v=135"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user