feat: WBS-1.4 매도 신호 시 Rule_Sell_Qty 자동 산출

This commit is contained in:
2026-06-13 13:54:45 +09:00
parent 8979ee7689
commit edcc6348c8
@@ -685,7 +685,12 @@ function _addTickerRoute_(ctx) {
? posRec.available_quantity : heldQty;
return Math.max(1, Math.min(Math.round(heldQty * sellRatioPct / 100), availQty));
})();
const ruleSellQty = "";
const ruleSellQty = (() => {
const heldQty = Number.isFinite(accountHoldingQty) ? accountHoldingQty : 0;
if (heldQty <= 0 || !sellRatioPct) return "";
const calc = Math.floor(heldQty * sellRatioPct / 100);
return calc > 0 ? calc : "";
})();
// ── Allowed_Action ───────────────────────────────────────────────────
// 우선순위: 데이터 품질 → HF005 → DART → 유동성 → REGIME매수차단 → RW청산 → SS001