如何在14:50读取数据并给出当下信号
由small_q创建,最终由small_q 被浏览 95 用户
问题
可不可以把每天最后一根K线定义在14:50,这样就可以当天出信号当天下单,不用等到第二天开盘。
视频
https://www.bilibili.com/video/BV1zZ4y1t7VX/
策略源码
https://bigquant.com/experimentshare/ccc914b3e10b4d18bb87bc2facafe51f
\
评论
- 平台不支持。只有一日结束后才可以有当日的分钟数据
- get_value
克隆之后报错呢
- \[2022-06-19 10:26:42.080212\] INFO: moduleinvoker: instruments.v2 开始运行..
\[2022-06-19 10:26:42.308480\] INFO: moduleinvoker: instruments.v2 运行完成\[0.228282s\].
\[2022-06-19 10:26:42.880319\] INFO: moduleinvoker: hfbacktest.v1 开始运行..
\[2022-06-19 10:26:46.479839\] INFO: hfbacktest: biglearning V1.4.12
\[2022-06-19 10:26:46.481875\] INFO: hfbacktest: bigtrader v1.9.6 2022-06-15
\[2022-06-19 10:26:47.381516\] INFO: moduleinvoker: cached.v2 开始运行..
\[2022-06-19 10:26:49.111060\] INFO: moduleinvoker: cached.v2 运行完成\[1.729537s\].
\[2022-06-19 10:26:49.534853\] INFO: moduleinvoker: cached.v2 开始运行..
\[2022-06-19 10:26:56.987390\] INFO: moduleinvoker: cached.v2 运行完成\[7.452532s\].
\[2022-06-19 10:26:57.691883\] ERROR: moduleinvoker: module name: hfbacktest, module version: v1, trackeback: AttributeError: 'NoneType' object has no attribute 'get_value'
\[2022-06-19 10:26:57.783927\] ERROR: moduleinvoker: module name: hftrade, module version: v2, trackeback: AttributeError: 'NoneType' object has no attribute 'get_value'
2022-06-19 10:26:57.691161 strategy strategy exception:Traceback (most recent call last):
File "bigtrader/strategy/engine.py", line 703, in bigtrader2.bigtrader.strategy.engine.StrategyEngine._call_strategy_func
File "bigtrader/strategy/strategy_base.py", line 2214, in bigtrader2.bigtrader.strategy.strategy_base.StrategyBase.call_handle_data
File "", line 23, in m2_handle_data_bigquant_run
price = data.current(context.ins, "close")
File "/var/app/enabled/bigtrader2/bigtrader/protocol.py", line 283, in current
return self.__data_engine.get_current_value(asset, curr_dt, fields)
File "bigtrader/mdata/engine.py", line 729, in bigtrader2.bigtrader.mdata.engine.DataEngine._get_minute_value_from_df
AttributeError: 'NoneType' object has no attribute 'get_value'