feat: Add DART strategy and related configurations
ㅇ Changes: - Introduced the DART strategy to the trading system, including its configuration and integration into the existing framework. - Updated the database schema to include DART-specific tables for disclosures and watchlists. - Enhanced the backtesting and parameter search functionalities to support the DART strategy. - Implemented new rules for browser verification and API interactions to ensure compliance with the updated DART strategy. Impact: - These additions expand the trading capabilities of the system, allowing for more comprehensive analysis and execution of DART-related strategies, while maintaining system integrity and performance.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
<li class="nav-item"><a class="nav-link" data-tab="holding" href="#">📈 홀딩 전략</a></li>
|
||||
<li class="nav-item"><a class="nav-link" data-tab="updownbox" href="#">📦 박스엔진</a></li>
|
||||
<li class="nav-item"><a class="nav-link" data-tab="updow" href="#">📡 영구구독 관리</a></li>
|
||||
<li class="nav-item"><a class="nav-link" data-tab="dart" href="#">📢 DART 수주</a></li>
|
||||
</ul>
|
||||
|
||||
<!-- ═══ 오늘 운영 (전략별·합계) ═══════════════════════════════════════════ -->
|
||||
@@ -512,6 +513,16 @@
|
||||
<label class="form-label param-row" title="종목당 하루 최대 거래횟수">일일최대매수</label>
|
||||
<input type="number" class="form-control" id="bt_max_daily" value="3" min="1" max="10">
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-end">
|
||||
<div class="form-check mb-2">
|
||||
<input class="form-check-input" type="checkbox" id="bt_eod_enabled" checked>
|
||||
<label class="form-check-label param-row" for="bt_eod_enabled" title="ON=설정 시각 이후 보유 전량 당일청산 (실매 장마감청산)">EOD청산</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-md-1">
|
||||
<label class="form-label param-row" title="EOD 당일청산 시각 (HH:MM)">EOD시각<span class="d-block text-muted fw-normal" style="font-size:10px">SCALP_EOD_HM</span></label>
|
||||
<input type="text" class="form-control" id="bt_eod_hm" value="15:25" placeholder="15:25">
|
||||
</div>
|
||||
</div>
|
||||
<!-- TRIGGER (SCAN vs TRIGGER — tail·모멘텀 탭과 동일 패턴) -->
|
||||
<div class="row g-2 align-items-center mt-2 p-2 rounded" style="background:#0d1117;border:1px solid #21262d">
|
||||
@@ -961,7 +972,7 @@
|
||||
<div class="col-6 col-md-2">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="tl_skip_hts_dupes" checked>
|
||||
<label class="form-check-label" for="tl_skip_hts_dupes" style="font-size:12px" title="HTS A조건(낙폭) 재검사 생략 — 이중필터 방지">HTS중복스킵</label>
|
||||
<label class="form-check-label" for="tl_skip_hts_dupes" style="font-size:12px" title="3분봉 직전대비 등락(BAR_CHG) 재검사 생략 — HTS 일봉A/1분G와 축이 다름">봉등락재검스킵</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-2">
|
||||
@@ -2883,6 +2894,83 @@
|
||||
|
||||
</div><!-- tab-updow end -->
|
||||
|
||||
<!-- ═══ DART 수주 공시 ═══════════════════════════════════════════════════ -->
|
||||
<div id="tab-dart" style="display:none">
|
||||
<div class="card p-3 mb-3">
|
||||
<h6 class="mb-2">📢 DART 수주/공급계약 <small class="text-muted">(영구구독과 분리 · TTL 워치)</small></h6>
|
||||
<div class="row g-2 align-items-center mb-2">
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_scan_en">
|
||||
<label class="form-check-label" for="dart_scan_en">SCAN</label>
|
||||
</div>
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_sub_en">
|
||||
<label class="form-check-label" for="dart_sub_en">임시구독</label>
|
||||
</div>
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_trade_en">
|
||||
<label class="form-check-label" for="dart_trade_en">매매</label>
|
||||
</div>
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_strat_en">
|
||||
<label class="form-check-label" for="dart_strat_en">전략등록</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="form-label mb-0 small">워치상한</label>
|
||||
<input type="number" id="dart_watch_max" class="form-control form-control-sm" style="width:80px" value="15">
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="form-label mb-0 small">TTL(h)</label>
|
||||
<input type="number" id="dart_watch_ttl" class="form-control form-control-sm" style="width:80px" value="24">
|
||||
</div>
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_quality_en" checked>
|
||||
<label class="form-check-label" for="dart_quality_en">품질필터</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="form-label mb-0 small">최소매출%</label>
|
||||
<input type="number" id="dart_min_sales" class="form-control form-control-sm" style="width:80px" value="5" step="0.1">
|
||||
</div>
|
||||
<div class="col-auto form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="dart_require_theme" checked>
|
||||
<label class="form-check-label" for="dart_require_theme">테마필수</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button class="btn btn-sm btn-primary" onclick="dartSaveConfig()">스위치 저장</button>
|
||||
<button class="btn btn-sm btn-outline-secondary" onclick="dartLoad()">새로고침</button>
|
||||
</div>
|
||||
</div>
|
||||
<small class="text-muted">매매 OFF 기본. 품질필터=건설·재개발 제외 + 매출대비% + 수출/반도체·방산 테마. 영구구독 탭과 무관.</small>
|
||||
</div>
|
||||
<div class="card p-3 mb-3">
|
||||
<h6>활성 워치</h6>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-sm table-dark">
|
||||
<thead><tr><th>코드</th><th>종목</th><th>공시</th><th>추가</th><th>만료</th></tr></thead>
|
||||
<tbody id="dart_watch_tbody"><tr><td colspan="5" class="text-muted">로딩…</td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card p-3 mb-3">
|
||||
<h6>최근 공시 <small class="text-muted">(필터통과/제외 포함)</small></h6>
|
||||
<div class="table-responsive" style="max-height:360px;overflow:auto">
|
||||
<table class="table table-sm table-dark">
|
||||
<thead><tr><th>시각</th><th>코드</th><th>종목</th><th>매출%</th><th>필터</th><th>공시명</th><th>링크</th></tr></thead>
|
||||
<tbody id="dart_disc_tbody"><tr><td colspan="7" class="text-muted">로딩…</td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card p-3 mb-3">
|
||||
<h6>백테 (공시 이벤트 × RSI 반등)</h6>
|
||||
<div class="row g-2 align-items-end">
|
||||
<div class="col-auto"><label class="small">시작</label><input type="date" id="dart_bt_start" class="form-control form-control-sm"></div>
|
||||
<div class="col-auto"><label class="small">종료</label><input type="date" id="dart_bt_end" class="form-control form-control-sm"></div>
|
||||
<div class="col-auto"><button class="btn btn-sm btn-success" onclick="dartRunBacktest()">백테 실행</button></div>
|
||||
</div>
|
||||
<pre id="dart_bt_out" class="mt-2 small text-muted" style="white-space:pre-wrap"></pre>
|
||||
</div>
|
||||
</div><!-- tab-dart end -->
|
||||
|
||||
</div><!-- container end -->
|
||||
|
||||
<script src="{{ url_for('static', filename='js/backtest.js') }}"></script>
|
||||
|
||||
Reference in New Issue
Block a user