Closed quant2008 closed 1 year ago
开发团队,您好。我执行如下代码进行回测,发现open_auction不会触发执行。是不是我哪里搞错了?
from rqalpha.apis import * from rqalpha import run_func code = 'RB2305' def init(context): pass def open_auction(context, bar_dict): print('open_auction') def before_trading(context): print('before_trading') config = { "base": { "start_date": "2022-12-1", "end_date": "2022-12-5", "frequency": "1d", "accounts": { "future": 1000000, "stock": 1000000 } }, } if __name__ == "__main__": # 您可以指定您要传递的参数 result = run_func(init=init, before_trading=before_trading, handle_bar=handle_bar, config=config)
open_auction 没传入到 run_func 中。
非常感谢。不过又发现一个问题,在open_auction中发单,似乎滑点设置不起作用。发的市价单总是以开盘价成交,是吗?
开发团队,您好。我执行如下代码进行回测,发现open_auction不会触发执行。是不是我哪里搞错了?