diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html index 575c6bb..8bfa55d 100644 --- a/crypto_monitor_binance/templates/index.html +++ b/crypto_monitor_binance/templates/index.html @@ -411,7 +411,6 @@ 下单成交价以交易所成交回报为准 - @@ -1501,20 +1500,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){ diff --git a/crypto_monitor_gate/templates/index.html b/crypto_monitor_gate/templates/index.html index d20da3f..7401a7b 100644 --- a/crypto_monitor_gate/templates/index.html +++ b/crypto_monitor_gate/templates/index.html @@ -390,7 +390,6 @@ 下单成交价以交易所成交回报为准 - @@ -1467,20 +1466,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){ diff --git a/crypto_monitor_okx/templates/index.html b/crypto_monitor_okx/templates/index.html index 585d38e..0085372 100644 --- a/crypto_monitor_okx/templates/index.html +++ b/crypto_monitor_okx/templates/index.html @@ -419,7 +419,6 @@ 下单成交价以交易所成交回报为准 - @@ -1496,20 +1495,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){ diff --git a/docs/manual-order-rr-preview.md b/docs/manual-order-rr-preview.md index 4a90745..a479789 100644 --- a/docs/manual-order-rr-preview.md +++ b/docs/manual-order-rr-preview.md @@ -6,7 +6,7 @@ - **价格模式**:填完币种、方向、止损价、止盈价后,调用 `GET /api/order_defaults` 取标记价,按几何距离计算 RR。 - **百分比模式**:填完币种、方向、止损%、止盈% 后拉快照校验币种,再显示 RR(`止盈% / 止损%`)。 -- **固定盈亏比模式**:不显示预估盈亏比(盈亏比由输入框直接指定;仍保留原有「预估止盈」)。 +- **固定盈亏比模式**:盈亏比由输入框直接指定;下方预览条显示预估风险/盈利/盈亏比(不再在表单行内显示预估止盈价)。 - **以损定仓**(`POSITION_SIZING_MODE=risk`):预估风险 = 当前交易基数 × `risk%`。 - **全仓杠杆**(`full_margin`):预估风险 = 合约可用 × 缓冲比例 × 杠杆(BTC/ETH 与山寨按 `.env` 配置)× 止损距离比例,与开仓时 `calc_risk_amount_from_plan` 一致。 diff --git a/lib/instance/templates/embed_boot_scripts.html b/lib/instance/templates/embed_boot_scripts.html index b219d0a..edc572d 100644 --- a/lib/instance/templates/embed_boot_scripts.html +++ b/lib/instance/templates/embed_boot_scripts.html @@ -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){ diff --git a/lib/instance/templates/embed_page_fragment.html b/lib/instance/templates/embed_page_fragment.html index a8cdf01..b901774 100644 --- a/lib/instance/templates/embed_page_fragment.html +++ b/lib/instance/templates/embed_page_fragment.html @@ -67,7 +67,6 @@ 下单成交价以交易所成交回报为准 -