Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以更新几个trader的example吗 #194

Open
kingmoon3 opened this issue Mar 25, 2022 · 1 comment
Open

可以更新几个trader的example吗 #194

kingmoon3 opened this issue Mar 25, 2022 · 1 comment

Comments

@kingmoon3
Copy link

例如examples里的macd_day_trader,

def on_profit_control(self):
    # 覆盖该函数做止盈 止损
    return super().on_profit_control()

def on_time(self, timestamp: pd.Timestamp):
    # 对selectors选出的标的做进一步处理,或者不使用selector完全自己根据时间和数据生成交易信号
    super().on_time(timestamp)

def on_trading_signals(self, trading_signals: List[TradingSignal]):
    # 批量处理交易信号,比如连接交易接口,发邮件,微信推送等
    super().on_trading_signals(trading_signals)

def on_trading_signal(self, trading_signal: TradingSignal):
    # 处理交易信号,比如连接交易接口,发邮件,微信推送等
    super().on_trading_signal(trading_signal)

def on_trading_open(self, timestamp):
    # 开盘自定义逻辑
    super().on_trading_open(timestamp)

诸如此类的自定义函数,没有例子可供参考,交易信号如何产生,文档内也没有相关说明,建议完善文档,谢谢。

@foolcage
Copy link
Member

正在完善,出了文档的部分是比较稳定的,有些还需要优化代码的,文档会慢一点。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants