Show estimated risk, profit, and RR below manual order form.

Add a preview bar under the live order form with risk in red and profit in green; extend preview logic for all SL/TP modes across embed and standalone instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 19:19:32 +08:00
parent cfc703ae5b
commit 0a20ee7eec
11 changed files with 181 additions and 89 deletions
-2
View File
@@ -1143,13 +1143,11 @@ function toggleSltpMode(){
const slEl = document.getElementById("order-sl");
const tpEl = document.getElementById("order-tp");
const fixedRrEl = document.getElementById("order-fixed-rr");
const rrPreviewEl = document.getElementById("order-rr-preview");
const slPctEl = document.getElementById("order-sl-pct");
const tpPctEl = document.getElementById("order-tp-pct");
if(!slEl || !tpEl || !slPctEl || !tpPctEl){ return; }
const pct = mode === "pct";
const fixed = mode === "fixed_rr";
if(rrPreviewEl) rrPreviewEl.style.display = fixed ? "none" : "";
slEl.style.display = pct ? "none" : "";
tpEl.style.display = (pct || fixed) ? "none" : "";
if(fixedRrEl) fixedRrEl.style.display = fixed ? "" : "none";