ricequant / rqalpha

A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities
http://rqalpha.io
Other
5.38k stars 1.61k forks source link

发现一枚bug: config.extra.context_vars not working if vars used in init() #663

Closed paulhybryant closed 2 years ago

paulhybryant commented 3 years ago

提 ISSUE 须知

请先阅读文档 rqalpha文档

如果仍有问题的话请在 issue列表 中寻找是否有相关问题的解决方案

如果没有的话 麻烦开一个issue 描述以下问题:

1. RQAlpha的版本

2. Python的版本

3. 是Windows/Linux/MacOS or others?

4. 您出现问题对应的源码/或者能复现问题的简易代码 以及对应的配置

5. 您出现的错误堆栈日志信息

main.py, around line 190

context.extra.context_vars are read and set after user_strategy.init() is called. If vars in context_vars is used in init(), it will fail.

paulhybryant commented 3 years ago

Friendly ping?

mar-heaven commented 2 years ago

has fixed in 4.6.0