ls kiwoom 구독 히스토리 모두 적재
This commit is contained in:
@@ -756,6 +756,13 @@ class KiwoomConditionSearchManager(ConditionSearchManager):
|
||||
|
||||
부모 ``_apply_result(strategy_id, rows)`` 를 그대로 호출 →
|
||||
enters/exits 계산·순서·EXIT grace·스냅샷 저장까지 KIS 와 동일하게 처리.
|
||||
|
||||
이중 적재 (기본 ON):
|
||||
실매 ``UNIVERSE_SOURCE`` 가 kiwoom_condition 이 아니어도
|
||||
(예: SCALP/BREAKOUT=ls_condition) RAM·``target_candidates_history`` 는 갱신한다.
|
||||
→ 다전략 동시 운영 시 키움/LS 이력 둘 다 쌓기 · 런타임 소스 전환 대비.
|
||||
``on_change`` 는 main 미주입이라 WS 구독 부작용 없음.
|
||||
끄기: ``KIWOOM_CONDITION_DUAL_HISTORY=false`` (레거시: 실매 소스만 반영).
|
||||
"""
|
||||
with self._kw_lock:
|
||||
bucket = dict(self._seq_codes.get(seq, {}))
|
||||
@@ -772,8 +779,10 @@ class KiwoomConditionSearchManager(ConditionSearchManager):
|
||||
disp = c
|
||||
rows.append({"code": c, "name": disp})
|
||||
from ..utils.universe_source import universe_source_active
|
||||
|
||||
dual = get_env_bool("KIWOOM_CONDITION_DUAL_HISTORY", True)
|
||||
for sid in sids:
|
||||
if not universe_source_active(sid, "kiwoom_condition"):
|
||||
if not dual and not universe_source_active(sid, "kiwoom_condition"):
|
||||
continue
|
||||
try:
|
||||
self._apply_result(sid, rows)
|
||||
|
||||
Reference in New Issue
Block a user