커밋 1 — 실매 가격 TTL 구멍 (본체)

왜: 체결이 없어도 마지막가는 유지인데, TTL로 None 만들고 매도/EOD를 건너뛰어 8/5 돌파·금요일 leftover가 남음. 호가필터 TTL 구멍과 같은 병.

넣을 파일

신규: kis_trader/engine/live_sell_price.py
kis_trader/strategies/base.py (_ws_last_quote, _resolve_sell_price)
전략: momentum.py scalping.py tail_catch.py breakout.py range_break.py dart_strategy.py updow_strategy.py updown_feed.py us_momentum.py
WS: ws_manager.py kis_ws.py kiwoom_ws.py ls_ws.py kis_ws_overseas.py
kis_trader/web/live_config_schema.py (WS_PRICE_MAX_AGE_SEC 기본 0)
database.py (키 주석 + legacy/ sys.path)
kis_trader/execution/order_manager.py (잔고 있는데 40240000 ghost_purge 금지 — 같은 EOD 사고)
EOD가 min_hold에 안 막히게 손본 momentum_hts_logic.py / scalping_engine.py / tail_engine.py (이 대화에서 손본 부분만 확인 후)
문서: docs/like_mcp.md/db_erd.md code_architecture.md (가격 TTL 문구)
메시지 초안

fix: 매수·매도 현재가를 TTL로 버리지 않음 (마지막 RAM)
횡보·체결 공백을 죽은 캐시로 오인해 None 처리하면 손절·EOD가 스킵된다.
호가필터와 같이 나이는 무시하고 마지막 체결가를 유지한다. EOD는 매수가 폴백.
영향: 실매 O / 백테·옵투나 봉 경로 거의 무관 (엔진 식 변경 아님)

커밋 2 — 루트 정리 (remove/ vs legacy/)
왜: 루트 단독봇·테스트는 지울 보관함으로. 웹·알람이 아직 쓰는 모듈은 remove에 두면 나중에 폴더째 삭제 때 깨짐.

넣을 파일

이동: 미사용 → remove/legacy_root/ (래퍼, ETF/키움 옛봇, 테스트, kiwoom_rest_api 등)
이동: 사용 중 → legacy/ (holding_bot kis_holding_ver1 news_analyzer kis_long_ver1/2)
신규: kis_trader/utils/legacy_root.py legacy/README.md remove/README.md
import 경로: backtest_web.py mm_butler.py mm_remote.py updow_holding_cfg.py dbband_stock_cfg.py param_search_updow*.py dbband_param_search.py param_search_apply_snapshot.py verify_three_paths.py
docs/like_mcp.md/code_architecture.md 수동 노트
메시지 초안

chore: 미사용 루트는 remove/, 웹·알람 구모듈은 legacy/
remove는 나중에 통째 삭제 예정. holding_bot·news_analyzer·kis_long은
ensure_legacy_root로 legacy/만 본다.
빼기: scratch/set_ws_price_max_age_zero.py (일회성)
This commit is contained in:
Your Name
2026-08-18 00:13:17 +09:00
parent 36a3e2b4a1
commit 6d2a706a48
1416 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,599 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Order_window</class>
<widget class="QWidget" name="Order_window">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>358</width>
<height>264</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<widget class="QTabWidget" name="order_tab_widget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>521</width>
<height>201</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>매도</string>
</attribute>
<widget class="QRadioButton" name="normal_radio">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>보통</string>
</property>
</widget>
<widget class="QRadioButton" name="market_radio">
<property name="geometry">
<rect>
<x>100</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>시장</string>
</property>
</widget>
<widget class="QLabel" name="order_qt_label">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>주문수량</string>
</property>
</widget>
<widget class="QLineEdit" name="order_qt_input">
<property name="geometry">
<rect>
<x>70</x>
<y>99</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="stock_input">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="order_won_input">
<property name="geometry">
<rect>
<x>70</x>
<y>129</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="order_won_label">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>주문단가</string>
</property>
</widget>
<widget class="QPushButton" name="order_btn">
<property name="geometry">
<rect>
<x>230</x>
<y>120</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>주 문</string>
</property>
</widget>
<widget class="QLabel" name="stock_label">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>32</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string> 종 목</string>
</property>
</widget>
<widget class="QLabel" name="stock_name_label">
<property name="geometry">
<rect>
<x>190</x>
<y>20</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>매수</string>
</attribute>
<widget class="QRadioButton" name="normal_radio_2">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>보통</string>
</property>
</widget>
<widget class="QLineEdit" name="stock_input_3">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="order_qt_input_2">
<property name="geometry">
<rect>
<x>70</x>
<y>99</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="order_won_input_2">
<property name="geometry">
<rect>
<x>70</x>
<y>129</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="stock_label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>32</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string> 종 목</string>
</property>
</widget>
<widget class="QLabel" name="order_qt_label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>주문수량</string>
</property>
</widget>
<widget class="QPushButton" name="order_btn_2">
<property name="geometry">
<rect>
<x>230</x>
<y>120</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>주 문</string>
</property>
</widget>
<widget class="QLabel" name="order_won_label_2">
<property name="geometry">
<rect>
<x>20</x>
<y>130</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>주문단가</string>
</property>
</widget>
<widget class="QRadioButton" name="market_radio_2">
<property name="geometry">
<rect>
<x>100</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>시장</string>
</property>
</widget>
<widget class="QLabel" name="stock_name_label_2">
<property name="geometry">
<rect>
<x>190</x>
<y>20</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>정정</string>
</attribute>
<widget class="QRadioButton" name="all_qty_radio">
<property name="geometry">
<rect>
<x>210</x>
<y>70</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>잔량</string>
</property>
</widget>
<widget class="QLineEdit" name="stock_input_4">
<property name="geometry">
<rect>
<x>70</x>
<y>30</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="order_qt_input_3">
<property name="geometry">
<rect>
<x>70</x>
<y>109</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="order_won_input_3">
<property name="geometry">
<rect>
<x>70</x>
<y>139</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="stock_label_4">
<property name="geometry">
<rect>
<x>20</x>
<y>30</y>
<width>32</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string> 종 목</string>
</property>
</widget>
<widget class="QLabel" name="order_qt_label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>110</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>정정수량</string>
</property>
</widget>
<widget class="QPushButton" name="order_btn_3">
<property name="geometry">
<rect>
<x>230</x>
<y>130</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string> 주 문 </string>
</property>
</widget>
<widget class="QLabel" name="order_won_label_3">
<property name="geometry">
<rect>
<x>20</x>
<y>140</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>정정단가</string>
</property>
</widget>
<widget class="QRadioButton" name="some_qty_radio">
<property name="geometry">
<rect>
<x>280</x>
<y>70</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>일부</string>
</property>
</widget>
<widget class="QLineEdit" name="org_no_input">
<property name="geometry">
<rect>
<x>70</x>
<y>70</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="org_no_label">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>원주문No</string>
</property>
</widget>
<widget class="QLabel" name="stock_name_label_3">
<property name="geometry">
<rect>
<x>200</x>
<y>30</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>취소</string>
</attribute>
<widget class="QRadioButton" name="some_qty_radio_2">
<property name="geometry">
<rect>
<x>280</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>일부</string>
</property>
</widget>
<widget class="QPushButton" name="order_btn_4">
<property name="geometry">
<rect>
<x>230</x>
<y>120</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string> 주 문 </string>
</property>
</widget>
<widget class="QLineEdit" name="order_qt_input_4">
<property name="geometry">
<rect>
<x>70</x>
<y>99</y>
<width>113</width>
<height>21</height>
</rect>
</property>
</widget>
<widget class="QLineEdit" name="stock_input_5">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="order_qt_label_4">
<property name="geometry">
<rect>
<x>20</x>
<y>100</y>
<width>56</width>
<height>12</height>
</rect>
</property>
<property name="text">
<string>취소수량</string>
</property>
</widget>
<widget class="QLabel" name="stock_label_5">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>32</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string> 종 목</string>
</property>
</widget>
<widget class="QRadioButton" name="all_qty_radio_2">
<property name="geometry">
<rect>
<x>210</x>
<y>60</y>
<width>90</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>잔량</string>
</property>
</widget>
<widget class="QLineEdit" name="org_no_input_2">
<property name="geometry">
<rect>
<x>70</x>
<y>60</y>
<width>113</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="org_no_label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>원주문No</string>
</property>
</widget>
<widget class="QLabel" name="stock_name_label_4">
<property name="geometry">
<rect>
<x>200</x>
<y>20</y>
<width>91</width>
<height>21</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
</widget>
<widget class="QLabel" name="status_label">
<property name="geometry">
<rect>
<x>20</x>
<y>220</y>
<width>311</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string/>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>