We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
# 在自己的DataSource类里定义获取最新价格的函数 def get_last_price(self, *args, **kwargs): print("call here....") return super().get_last_price(*args, **kwargs)
并没有执行到
The text was updated successfully, but these errors were encountered:
看了下是要写在自己的BarDictPriceBoard的子类里,但是mod初始化注入的时候要生成一个BarDictPriceBoard的实例, 需要bar_dict参数 不知如何生成
Sorry, something went wrong.
BarDictPriceBoard 是基于AbstractPriceBoard 扩展的 但实际上不需要初始化的时候获取 bar_dict 这只是我们的一种实现而已。
实际上可以直接通过 Environment.get_instance().bar_dict 来获取。
2c076bb Commit 取消了初始化的时候 bar_dict 作为依赖项的传入,改用了 创建了一个 _bar_dict 的property 来实现对应数据的读取,您可以参考一下。
目前代码提交到了develop 分支,如果您需要继承BarDictPriceBoard,要么使用develop分支 要么稍微等一下 今天会发布一个新的版本,其中包含了此次修改。
2c076bb
@dongyi 2.2.0 已经发布
wh1100717
No branches or pull requests
1. RQAlpha的版本 2.1.4
2. Python的版本 3.6
3. 是Windows/Linux/MacOS or others? windows
4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置
并没有执行到
5. 您出现的错误堆栈日志信息
The text was updated successfully, but these errors were encountered: