20 lines
602 B
Python
20 lines
602 B
Python
"""
|
|
strategy/base.py - 전략 추상 클래스
|
|
"""
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class BaseStrategy(ABC):
|
|
@abstractmethod
|
|
def check_entry(self, ticker: str, name: str,
|
|
current_price: float, **kwargs) -> dict:
|
|
"""진입 신호 체크. signal, reason, boosted, multiplier 반환"""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def check_exit(self, ticker: str, entry_price: float,
|
|
current_price: float, qty: int,
|
|
tp1_done: bool, sl_pct: float) -> dict:
|
|
"""청산 신호 체크. signal, reason, qty 반환"""
|
|
pass
|