fix: remove inline estimated TP preview from fixed RR order form
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user