feat: add multi-symbol config (symbols list, correlation_symbols, max_same_direction)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,11 @@ class Config:
|
||||
api_key: str = ""
|
||||
api_secret: str = ""
|
||||
symbol: str = "XRPUSDT"
|
||||
symbols: list = None
|
||||
correlation_symbols: list = None
|
||||
leverage: int = 10
|
||||
max_positions: int = 3
|
||||
max_same_direction: int = 2
|
||||
stop_loss_pct: float = 0.015 # 1.5%
|
||||
take_profit_pct: float = 0.045 # 4.5% (3:1 RR)
|
||||
trailing_stop_pct: float = 0.01 # 1%
|
||||
@@ -31,3 +34,15 @@ class Config:
|
||||
self.margin_min_ratio = float(os.getenv("MARGIN_MIN_RATIO", "0.20"))
|
||||
self.margin_decay_rate = float(os.getenv("MARGIN_DECAY_RATE", "0.0006"))
|
||||
self.ml_threshold = float(os.getenv("ML_THRESHOLD", "0.55"))
|
||||
self.max_same_direction = int(os.getenv("MAX_SAME_DIRECTION", "2"))
|
||||
|
||||
# symbols: SYMBOLS 환경변수 우선, 없으면 SYMBOL에서 변환
|
||||
symbols_env = os.getenv("SYMBOLS", "")
|
||||
if symbols_env:
|
||||
self.symbols = [s.strip() for s in symbols_env.split(",") if s.strip()]
|
||||
else:
|
||||
self.symbols = [self.symbol]
|
||||
|
||||
# correlation_symbols
|
||||
corr_env = os.getenv("CORRELATION_SYMBOLS", "BTCUSDT,ETHUSDT")
|
||||
self.correlation_symbols = [s.strip() for s in corr_env.split(",") if s.strip()]
|
||||
|
||||
Reference in New Issue
Block a user