fix: remove inline estimated TP preview from fixed RR order form

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-06 00:40:16 +08:00
parent e526d6af76
commit 5137d5ed17
6 changed files with 1 additions and 61 deletions
@@ -766,20 +766,6 @@ function calcTpFromFixedRr(direction, entry, sl, rr){
return e + (e - s) * r;
}
function refreshOrderTpPreview(entryPx){
const mode = (document.getElementById("sltp-mode")||{}).value || "fixed_rr";
const preview = document.getElementById("order-tp-preview");
if(!preview) return;
if(mode !== "fixed_rr"){
preview.style.display = "none";
return;
}
preview.style.display = "";
const direction = (document.getElementById("order-direction")||{}).value || "long";
const sl = Number((document.getElementById("order-sl")||{}).value);
const rr = Number((document.getElementById("order-fixed-rr")||{}).value) || MANUAL_FIXED_RR_DEFAULT;
const entry = entryPx != null && Number.isFinite(Number(entryPx)) ? Number(entryPx) : sl;
const tp = calcTpFromFixedRr(direction, entry, sl, rr);
preview.textContent = tp == null ? "预估止盈:—" : ("预估止盈:" + formatPriceForInput(tp));
if(window.ManualOrderRrPreview) ManualOrderRrPreview.schedule();
}
function calcClientRr(direction, entry, sl, tp){