전략 파라미터 조정 — SL 완화·TP 구간 축소·재진입 쿨다운 연장
- SL: -1.5% → -2.0% (개장 노이즈 손절 방지) - TP1: +2.0% → +1.5%, 매도 비율 50% → 70% (확정 빈도 향상) - TP2: +3.0% → +2.5% (달성률 개선) - 재진입 쿨다운: 30분 → 60분 (동일 종목 반복 손절 차단) - main.py: 청산 체크 오류 시 5초 대기 추가 (API 과부하 방지) - volatility_breakout.py: TP2 qty 버그 수정 (tp1_done=False 시 전량 청산) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ import logging
|
||||
import os
|
||||
from datetime import datetime
|
||||
from app.config import (
|
||||
STRATEGY_K, TP1_PCT, TP2_PCT,
|
||||
STRATEGY_K, TP1_PCT, TP2_PCT, TP1_RATIO,
|
||||
ENTRY_START, ENTRY_END,
|
||||
AI_CONTEXT_PATH, AI_MIN_SCORE,
|
||||
AI_BOOST_MULTI, MIN_TRADE_AMOUNT,
|
||||
@@ -209,12 +209,12 @@ class VolatilityBreakout:
|
||||
})
|
||||
return result
|
||||
|
||||
# 2차 익절
|
||||
# 2차 익절 — 잔여 전량 청산
|
||||
if current_price >= tp2_price:
|
||||
result.update({
|
||||
"signal": True,
|
||||
"reason": "TP2",
|
||||
"qty" : qty - (qty // 2 if not tp1_done else 0),
|
||||
"qty" : qty,
|
||||
"price" : tp2_price,
|
||||
})
|
||||
return result
|
||||
@@ -224,7 +224,7 @@ class VolatilityBreakout:
|
||||
result.update({
|
||||
"signal": True,
|
||||
"reason": "TP1",
|
||||
"qty" : qty // 2,
|
||||
"qty" : max(1, int(qty * TP1_RATIO)),
|
||||
"price" : tp1_price,
|
||||
})
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user