diff --git a/docs/binance-orderbook-trade-development.md b/docs/binance-orderbook-trade-development.md index c203035..84256e4 100644 --- a/docs/binance-orderbook-trade-development.md +++ b/docs/binance-orderbook-trade-development.md @@ -159,7 +159,7 @@ Continuous ladder trading is available only for close actions through `Option/Al Continuous-session feedback stays in the shared ladder status row and uses compact Chinese counters. `2/3 轮` means two rounds completed out of three started, `本轮 1/3 笔` reports the latest partial plan, and `累计 7 笔` reports all confirmed submissions across the session. Confirmed cancellations are appended only when greater than zero. Round outcomes must expose a detached progress snapshot so a terminal continuous summary cannot be overwritten by the latest single-round message. -The active continuous-close control keeps a direction-specific stop action (`停止连续平多` / `停止连续平空`) throughout both execution and inter-round waiting. Before the native submit control is ready, the status places `等待按钮恢复` immediately after the continuous-state label. Only after the fixed cooldown actually begins may it show `1s 后继续` in that same priority position; this is a static duration label, not a countdown. The button must not temporarily revert to a ladder-start action between rounds. +The active continuous-close control keeps a compact direction-specific stop action (`停止平多` / `停止平空`) on one line throughout both execution and inter-round waiting. Before the native submit control is ready, the status places `等待按钮恢复` immediately after the continuous-state label. Only after the fixed cooldown actually begins may it show `1s 后继续` in that same priority position; this is a static duration label, not a countdown. The button must not temporarily revert to a ladder-start action between rounds. When selecting account-order tabs, scope to the bottom account-orders tab group. Do not globally match `当前委托` or `Open Orders`. diff --git a/scripts/binance-orderbook-trade.user.js b/scripts/binance-orderbook-trade.user.js index e2a6acd..9e3f3fc 100644 --- a/scripts/binance-orderbook-trade.user.js +++ b/scripts/binance-orderbook-trade.user.js @@ -3,7 +3,7 @@ // @namespace binance.orderbook.trade // @icon data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E // @icon64 data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E -// @version 2.7.158 +// @version 2.7.159 // @author jackhai9 // @description 单击订单簿价格,按当前开仓/平仓 tab 自动填数量并执行下单,内置数量倍率面板 // @match https://www.binance.com/*/futures/* @@ -153,10 +153,6 @@ OPEN_SHORT: "停止开空", CLOSE_LONG: "停止平多", CLOSE_SHORT: "停止平空" - }), - stopContinuousLadderByAction: freezeCopy({ - CLOSE_LONG: "停止连续平多", - CLOSE_SHORT: "停止连续平空" }) }), status: freezeCopy({ @@ -7067,8 +7063,8 @@ if (activeActionType !== actionType) { return ladderActionButton(actionType, label, tone, disabled); } - const stopLabel = activeContinuousLadderActionType === actionType ? PANEL_COPY.action.stopContinuousLadderByAction[actionType] : PANEL_COPY.action.stopLadderByAction[actionType]; - return ``; + const stopLabel = PANEL_COPY.action.stopLadderByAction[actionType]; + return ``; } function getLadderControlSections(tradeMode, closeContext, symbol, precision) { const ladderRunning = !!ladderTask || !!continuousLadderTask; diff --git a/src/binance-orderbook-trade/contracts/panel-copy.js b/src/binance-orderbook-trade/contracts/panel-copy.js index 86d1475..91a8176 100644 --- a/src/binance-orderbook-trade/contracts/panel-copy.js +++ b/src/binance-orderbook-trade/contracts/panel-copy.js @@ -29,10 +29,6 @@ export const PANEL_COPY = Object.freeze({ CLOSE_LONG: '停止平多', CLOSE_SHORT: '停止平空', }), - stopContinuousLadderByAction: freezeCopy({ - CLOSE_LONG: '停止连续平多', - CLOSE_SHORT: '停止连续平空', - }), }), status: freezeCopy({ precisionUpdated: '精度推荐已更新', diff --git a/src/binance-orderbook-trade/index.user.js b/src/binance-orderbook-trade/index.user.js index 6887ecb..d849e89 100644 --- a/src/binance-orderbook-trade/index.user.js +++ b/src/binance-orderbook-trade/index.user.js @@ -3,7 +3,7 @@ // @namespace binance.orderbook.trade // @icon data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E // @icon64 data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2064%2064%22%3E%3Crect%20width%3D%2264%22%20height%3D%2264%22%20rx%3D%2214%22%20fill%3D%22%23f0b90b%22%2F%3E%3Ctext%20x%3D%2232%22%20y%3D%2249%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2C%20sans-serif%22%20font-size%3D%2242%22%20font-weight%3D%22800%22%20fill%3D%22%23111827%22%3EJ%3C%2Ftext%3E%3C%2Fsvg%3E -// @version 2.7.158 +// @version 2.7.159 // @author jackhai9 // @description 单击订单簿价格,按当前开仓/平仓 tab 自动填数量并执行下单,内置数量倍率面板 // @match https://www.binance.com/*/futures/* @@ -5557,10 +5557,8 @@ import { if (activeActionType !== actionType) { return ladderActionButton(actionType, label, tone, disabled); } - const stopLabel = activeContinuousLadderActionType === actionType - ? PANEL_COPY.action.stopContinuousLadderByAction[actionType] - : PANEL_COPY.action.stopLadderByAction[actionType]; - return ``; + const stopLabel = PANEL_COPY.action.stopLadderByAction[actionType]; + return ``; } function getLadderControlSections(tradeMode, closeContext, symbol, precision) { diff --git a/test/unit/binance-orderbook-trade/panel-copy.test.js b/test/unit/binance-orderbook-trade/panel-copy.test.js index f36f3b9..58ac4fd 100644 --- a/test/unit/binance-orderbook-trade/panel-copy.test.js +++ b/test/unit/binance-orderbook-trade/panel-copy.test.js @@ -36,10 +36,6 @@ test('panel copy keeps the approved labels and tooltips in one contract', () => CLOSE_LONG: '停止平多', CLOSE_SHORT: '停止平空', }, - stopContinuousLadderByAction: { - CLOSE_LONG: '停止连续平多', - CLOSE_SHORT: '停止连续平空', - }, }, status: { precisionUpdated: '精度推荐已更新', diff --git a/test/unit/binance-orderbook-trade/source-regressions.test.js b/test/unit/binance-orderbook-trade/source-regressions.test.js index 1bc8cf5..d5610c6 100644 --- a/test/unit/binance-orderbook-trade/source-regressions.test.js +++ b/test/unit/binance-orderbook-trade/source-regressions.test.js @@ -644,7 +644,9 @@ test('Option or Alt click continuously repeats close ladders only after readines assert.match(actionButtonBody, /Option\/Alt \+ 单击:连续交易/); assert.doesNotMatch(source, /Continuous trading (?:stopped|failed)/); assert.match(executionButtonBody, /activeLadderActionType \|\| activeContinuousLadderActionType/); - assert.match(executionButtonBody, /PANEL_COPY\.action\.stopContinuousLadderByAction\[actionType\]/); + assert.match(executionButtonBody, /PANEL_COPY\.action\.stopLadderByAction\[actionType\]/); + assert.doesNotMatch(source, /stopContinuousLadderByAction/); + assert.match(executionButtonBody, /white-space:nowrap;overflow:hidden/); assert.match(controlSectionsBody, /!!ladderTask \|\| !!continuousLadderTask/); });