refactor: 缠论引擎迁入 chan/ 分层解耦,指标外置
将核心结构、指标与分析拆到 chan/{core,indicators,analysis,pipeline};
根目录保留兼容 shim;strategies 改为从 chan 包导入;买卖点经 bsp_macd 与 MACD 接合。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""指标参数配置(不再散落在结构流水线内)。"""
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List, Tuple
|
||||
|
||||
|
||||
@dataclass
|
||||
class IndicatorConfig:
|
||||
macd_fast: int = 26
|
||||
macd_slow: int = 52
|
||||
macd_signal: int = 9
|
||||
ema_periods: Tuple[int, ...] = (5, 7, 10, 13, 24, 26, 52, 104, 156, 208)
|
||||
rsi_period: int = 14
|
||||
atr_period: int = 14
|
||||
# (period, nbdevup, nbdevdn, name_suffix)
|
||||
bbands: List[Tuple[int, float, float, str]] = field(
|
||||
default_factory=lambda: [
|
||||
(365, 3.0, 3.0, "365"),
|
||||
(120, 3.0, 3.0, "120"),
|
||||
(20, 2.0, 2.0, "30"),
|
||||
(20, 2.0, 2.0, "302"),
|
||||
(26, 3.0, 3.0, "2633"),
|
||||
]
|
||||
)
|
||||
bb_middle_sma_period: int = 90
|
||||
Reference in New Issue
Block a user