From f9257b64e4a8acb8b3605aa46f4b383b2f14782d Mon Sep 17 00:00:00 2001 From: dekun Date: Tue, 16 Jun 2026 16:19:32 +0800 Subject: [PATCH] feat(order): show estimated RR before open across four exchanges Add shared manual_order_rr_preview.js to fetch order_defaults after symbol and TP/SL inputs complete, display estimated profit-loss ratio before submit in price and percentage modes (and fixed RR), unified for risk and full-margin sizing. Co-authored-by: Cursor --- crypto_monitor_binance/templates/index.html | 8 + crypto_monitor_gate/templates/index.html | 8 + crypto_monitor_gate_bot/templates/index.html | 8 + crypto_monitor_okx/templates/index.html | 8 + docs/manual-order-rr-preview.md | 30 +++ static/manual_order_rr_preview.js | 225 +++++++++++++++++++ tests/test_manual_order_rr_preview.py | 39 ++++ 7 files changed, 326 insertions(+) create mode 100644 docs/manual-order-rr-preview.md create mode 100644 static/manual_order_rr_preview.js create mode 100644 tests/test_manual_order_rr_preview.py diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html index b2dca61..34e5a70 100644 --- a/crypto_monitor_binance/templates/index.html +++ b/crypto_monitor_binance/templates/index.html @@ -396,6 +396,7 @@ + 预估盈亏比:— @@ -809,6 +810,7 @@ + + + +