Improve key monitor form with bar period, box direction, and labeled fields.
Match order-monitor layout; persist bar_period and enforce upper-direction filter for box breakouts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+13
-4
@@ -5,26 +5,35 @@
|
||||
(function () {
|
||||
var keyTimer = null;
|
||||
var typeEl = document.getElementById('key-type');
|
||||
var rowAuto = document.getElementById('key-row-auto');
|
||||
var tradeModeWrap = document.getElementById('key-trade-mode-wrap');
|
||||
var directionWrap = document.getElementById('key-direction-wrap');
|
||||
var rrWrap = document.getElementById('key-rr-wrap');
|
||||
var rrEl = document.getElementById('key-rr');
|
||||
var trailingWrap = document.getElementById('key-trailing-wrap');
|
||||
var trailingHint = document.getElementById('key-trailing-hint');
|
||||
var trailingEl = document.getElementById('key-trailing');
|
||||
var rowActions = document.getElementById('key-row-actions');
|
||||
var rowPrices = document.getElementById('key-row-prices');
|
||||
var directionEl = document.getElementById('key-direction');
|
||||
|
||||
function isAutoType(typ) {
|
||||
return typ === '箱体突破' || typ === '收敛突破';
|
||||
}
|
||||
|
||||
function isBoxType(typ) {
|
||||
return typ === '箱体突破';
|
||||
}
|
||||
|
||||
function syncKeyForm() {
|
||||
var typ = typeEl ? typeEl.value : '';
|
||||
var auto = isAutoType(typ);
|
||||
var box = isBoxType(typ);
|
||||
if (rowAuto) rowAuto.classList.toggle('is-hidden', !auto);
|
||||
if (tradeModeWrap) tradeModeWrap.classList.toggle('is-hidden', !auto);
|
||||
if (rrWrap) rrWrap.classList.toggle('is-hidden', !auto);
|
||||
if (directionWrap) directionWrap.classList.toggle('is-hidden', !box);
|
||||
if (trailingWrap) trailingWrap.classList.toggle('is-hidden', !auto);
|
||||
if (rowActions) rowActions.classList.toggle('key-actions-zone', !auto);
|
||||
if (rowPrices) rowPrices.classList.toggle('key-zone-mode', !auto);
|
||||
if (trailingHint) trailingHint.classList.toggle('is-hidden', !auto);
|
||||
if (directionEl) directionEl.disabled = !box;
|
||||
if (!auto && trailingEl) trailingEl.checked = false;
|
||||
if (auto && trailingEl && trailingEl.checked && rrEl) {
|
||||
if (parseFloat(rrEl.value) < 3) rrEl.value = '3';
|
||||
|
||||
Reference in New Issue
Block a user