Files
Chan/chan/core/ChanBSP.py
T
PorterandCursor 2c1232555e refactor: 缠论引擎迁入 chan/ 分层解耦,指标外置
将核心结构、指标与分析拆到 chan/{core,indicators,analysis,pipeline};
根目录保留兼容 shim;strategies 改为从 chan 包导入;买卖点经 bsp_macd 与 MACD 接合。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 14:47:13 +08:00

24 lines
774 B
Python

from . import ChanBI
from .ChanEnum import Chan_BSP_TYPE, Chan_BSP_DIR
class ChanBSP():
def __init__(self, bi: ChanBI, index, type: Chan_BSP_TYPE, ddir: Chan_BSP_DIR, sure_time, zs_count, zs, seg):
self.bi = bi
self.klc = bi.end_klc
self.index = index
self.type = type
self.start_time = self.klc.start_time
self.end_time = self.klc.end_time
if sure_time:
self.is_sure = True
self.sure_time = sure_time
else:
self.is_sure = False
self.sure_time = None
self.dir = ddir
self.zs_count = zs_count
self.zs = zs
self.seg = bi.seg
def set_sure_time(self, sure_time):
self.is_sure = True
self.sure_time = sure_time