from config import Config
from data_fetcher import MarketDataFetcher
from strategy import TurtleStrategy
from notifier import EmailNotifier
from storage import DatabaseManager
class TradingSystem:
    def __init__(self):
        self.config = Config()
        self.data_fetcher = MarketDataFetcher(self.config.DATA_SOURCES)
        self.strategy = TurtleStrategy(self.config.STRATEGY_PARAMS)
        self.notifier = EmailNotifier(self.config.EMAIL_CONFIG)
        self.db = DatabaseManager()
        
    def run(self):
        # 1. 启动数据获取
        # 2. 运行策略
        # 3. 处理信号
        # 4. 发送通知
        pass
        
    def handle_signal(self, signal):
        # 处理交易信号
        self.notifier.send_notification(signal)
        self.db.save_signal(signal)