Tagesverlust-Meldung kompakt und im Feld TAG P/L (v=215)
User-Vorgabe. Das breite Banner ueber der Karte ist weg; an seine Stelle tritt
`#cb-mini` direkt neben dem Tages-P/L.
vorher: "⚠ Tagesverlust -46,28 € — Stopp bei -55 € (85 % erreicht)"
als eigene Zeile ueber der ganzen Karte
jetzt : TAG P/L -46,28 85 % (CB)
drei Zeichen neben der Zahl, bernstein ab 60 %, rot bei "⛔ Stopp"
⚠ Die Zahl steht jetzt dort, wo sie gelesen wird: direkt an dem Wert, der den
Breaker ausloest, und neben dem Knopf, der ihn schaltet. Der vollstaendige Text
steckt im Tooltip - kompakt heisst hier "weniger Flaeche", nicht "weniger
Information".
⚠ Das alte `#circuit-banner` bleibt als Halter im DOM und wird weiter befuellt;
ausgeblendet wird es per CSS (`.circuit{display:none}`). Zurueckholen ist damit
eine einzige Zeile - und der Render-Pfad bleibt unveraendert, statt zwei Wege zu
haben, die auseinanderlaufen koennen.
Live gegengeprueft: TAG P/L enthaelt cb-mini UND btn-cb, 0 doppelte IDs, und
beim aktuellen Stand (-46,28 von -54,58) zeigt es "85 %" in Bernstein.
Pipeline A-G gruen, 97 Tests, 14 render*-Funktionen, deployt.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ba036291d
commit
db0de81ef6
+31
-2
@@ -910,7 +910,36 @@ function renderStructure(s) {
|
||||
|
||||
// Circuit Breaker — roter Banner wenn ausgelöst, bernstein wenn nah (>60% des Limits).
|
||||
function renderCircuitBreaker(cb) {
|
||||
const el = $("circuit-banner");
|
||||
// ⚠⚠ KOMPAKT und IM Feld TAG P/L (User-Vorgabe 2026-08-21). Das breite
|
||||
// Banner über der Karte ist per CSS ausgeblendet; `#cb-mini` hängt direkt
|
||||
// an der Zahl, die den Breaker auslöst — dort wird sie auch gelesen.
|
||||
// ⚠ Das alte Element bleibt als Halter im DOM und wird weiter befüllt,
|
||||
// damit ein Zurückholen eine einzige CSS-Zeile ist.
|
||||
{
|
||||
const mini = $streng("cb-mini");
|
||||
if (mini) {
|
||||
if (!cb || !cb.enabled) {
|
||||
mini.textContent = ""; mini.className = "cb-mini";
|
||||
mini.title = "Tagesverlust-Stopp ist AUS.";
|
||||
} else if (cb.tripped) {
|
||||
mini.textContent = "⛔ Stopp";
|
||||
mini.className = "cb-mini tripped";
|
||||
mini.title = `Circuit Breaker AUSGELÖST — Tagesverlust ${fmt(cb.day_total, 2)} € `
|
||||
+ `erreicht (Limit −${fmt(cb.limit_eur, 0)} €). Keine Auto-Trades mehr heute.`;
|
||||
} else if (cb.limit_eur && cb.day_total < 0) {
|
||||
const pct = Math.round(100 * Math.abs(cb.day_total) / cb.limit_eur);
|
||||
mini.textContent = pct + " %";
|
||||
mini.className = "cb-mini" + (pct >= 60 ? " near" : "");
|
||||
mini.title = `${pct} % des Tagesverlust-Limits verbraucht `
|
||||
+ `(${fmt(cb.day_total, 2)} von −${fmt(cb.limit_eur, 0)} €). Bei 100 % `
|
||||
+ `schließt der Bot und sperrt Auto-Trades bis morgen.`;
|
||||
} else {
|
||||
mini.textContent = ""; mini.className = "cb-mini";
|
||||
mini.title = `Tagesverlust-Limit −${fmt(cb.limit_eur, 0)} € — heute noch nicht im Minus.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
const el = $streng("circuit-banner");
|
||||
if (!el) return;
|
||||
if (!cb || !cb.enabled) { el.className = "circuit hidden"; el.textContent = ""; return; }
|
||||
const limit = cb.limit_eur, day = cb.day_total;
|
||||
@@ -2490,7 +2519,7 @@ async function closeSlot(slot, label, pnl) {
|
||||
// und der Browser zeigte Altes. Statt das jedes Mal von Hand zu diagnostizieren,
|
||||
// sagt die Seite es jetzt selbst.
|
||||
// ⚠ Bewusst SICHTBAR statt nur Konsole: die Konsole sieht am Handy niemand.
|
||||
const _JS_V = "214";
|
||||
const _JS_V = "215";
|
||||
{
|
||||
const htmlV = document.body && document.body.dataset
|
||||
? document.body.dataset.htmlV : null;
|
||||
|
||||
+8
-4
@@ -12,9 +12,9 @@
|
||||
⚠ LOKAL eingebunden, kein CDN: die PWA laeuft ueber WireGuard
|
||||
und muss offline funktionieren. -->
|
||||
<link rel="stylesheet" href="pico.min.css?v=1">
|
||||
<link rel="stylesheet" href="style.css?v=214">
|
||||
<link rel="stylesheet" href="style.css?v=215">
|
||||
</head>
|
||||
<body data-html-v="214">
|
||||
<body data-html-v="215">
|
||||
<!-- Modul-Menü (ganz oben) -->
|
||||
<nav id="tabs">
|
||||
<button class="tab active" data-view="dash">Dashboard</button>
|
||||
@@ -48,7 +48,7 @@
|
||||
zunaechst umgekehrt gewuenscht und dann invertiert — jetzt lesen
|
||||
sich CB, AT und TR gleich: gruen heisst ueberall "an". -->
|
||||
<div class="px px-cb"><label title="Kontostand ohne die offene Position.">BALANCE</label><span class="px-zeile"><span id="balance">—</span><button class="cb-dot" id="btn-at" title="AUTO TRADER — Auto-Entry auf die gruene M15-Karte. ⚠ GEMESSEN NEGATIV (OeR -0,162/-0,094, KI ohne Null, schlechter als die HTF-Richtung UND als ihr eigenes Gegenteil) — reiner Test.">AT</button><button class="cb-dot" id="btn-trail" title="TRAILING der offenen Position an/aus. Startet ab 1,3×ATR Gewinn und lockert einen bereits engeren Stop niemals.">TR</button></span></div>
|
||||
<div class="px px-cb"><label title="Realisiertes Ergebnis von heute. Brutto — die Quellensteuer wird größtenteils erstattet und ist hier nicht abgezogen.">TAG P/L</label><span class="px-zeile"><span id="day-pl">—</span><button class="cb-dot" id="btn-cb" title="Circuit Breaker (Tagesverlust-Stopp) an/aus. Gruen = scharf, rot = aus.">CB</button></span></div>
|
||||
<div class="px px-cb"><label title="Realisiertes Ergebnis von heute. Brutto — die Quellensteuer wird größtenteils erstattet und ist hier nicht abgezogen.">TAG P/L</label><span class="px-zeile"><span id="day-pl">—</span><span class="cb-mini" id="cb-mini"></span><button class="cb-dot" id="btn-cb" title="Circuit Breaker (Tagesverlust-Stopp) an/aus. Gruen = scharf, rot = aus.">CB</button></span></div>
|
||||
<div class="px"><label title="Kontostand einschließlich der offenen Position.">EQUITY</label><span id="equity">—</span></div>
|
||||
<div class="px"><label id="hdr-price-lbl" title="Der Kurs, zu dem tatsächlich gehandelt wird. Steht er länger als 3 Minuten still, gilt der Markt als geschlossen und das Label zeigt ZU.">PEPPERSTONE KURS</label><span id="hdr-price">—</span></div>
|
||||
<!-- Hyperliquid-Kurs NEBEN dem Broker-Kurs (User 2026-08-01). HL handelt 24/7,
|
||||
@@ -71,6 +71,10 @@
|
||||
|
||||
<main id="view-dash" class="view">
|
||||
<!-- Circuit Breaker (Tagesverlust-Stopp) — roter Banner, nur wenn ausgelöst/nah -->
|
||||
<!-- ⚠ Das breite Circuit-Breaker-Banner ist am 2026-08-21 durch die
|
||||
kompakte Zeile `#cb-mini` IM Feld TAG P/L ersetzt (User-Vorgabe). Das
|
||||
Element bleibt als leerer Halter stehen: `renderCircuitBreaker`
|
||||
schreibt weiter hinein, und ein Zurueckholen ist eine CSS-Zeile. -->
|
||||
<div id="circuit-banner" class="circuit hidden"></div>
|
||||
<!-- Aktueller Trade (nur bei offener Position) — Anzeige + SL/TP/Close editierbar -->
|
||||
<section class="card wide trade-bar hidden" id="trade-bar">
|
||||
@@ -487,6 +491,6 @@
|
||||
</div>
|
||||
<div id="toast" class="toast hidden"></div>
|
||||
|
||||
<script src="app.js?v=214"></script>
|
||||
<script src="app.js?v=215"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -795,3 +795,13 @@ main{padding-bottom:4.1111rem} /* Platz für die fixe Leiste */
|
||||
Die kurzzeitig umgekehrte CB-Zuordnung ist auf User-Wunsch zurueckgedreht. */
|
||||
.cb-dot.an{background:#0d2a16; border-color:#1a4731; color:#3fb950}
|
||||
.cb-dot.aus{background:var(--surface-2); border-color:var(--border); color:var(--dim)}
|
||||
|
||||
/* ── Kompakte Circuit-Breaker-Anzeige IM Feld TAG P/L (User 2026-08-21) ────
|
||||
Ersetzt das breite Banner ueber der Karte. ⚠ Das alte `#circuit-banner`
|
||||
bleibt als Halter im DOM und wird weiter befuellt — hier nur ausgeblendet,
|
||||
damit ein Zurueckholen eine einzige Zeile ist. */
|
||||
.circuit{display:none !important}
|
||||
.cb-mini{font-family:var(--mono); font-size:0.6111rem; font-weight:600;
|
||||
color:var(--dim); margin-left:0.3333rem; white-space:nowrap}
|
||||
.cb-mini.near{color:var(--accent)}
|
||||
.cb-mini.tripped{color:#f85149}
|
||||
|
||||
Reference in New Issue
Block a user