VeighNa量化社区
你的开源社区量化交易平台
Member
avatar
加入于:
帖子: 7
声望: 5

qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
CThostFtdcUserApiImplBase::OnSessionDisconnected[0000026BCA6E9228][-1315700735][ 8193]
qt.network.ssl: QSslSocket: cannot call unresolved function SSL_set_psk_use_session_callback
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\vnstudio\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\vnstudio\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_backtester\engine.py", line 172, in run_backtesting
engine.run_backtesting()
File "C:\vnstudio\lib\site-packages\vnpy\app\cta_strategy\backtesting.py", line 282, in run_backtesting
self.callback(data)
TypeError: 'NoneType' object is not callable

Administrator
avatar
加入于:
帖子: 4550
声望: 325

策略中需要先调用load_bar或者load_tick加载历史数据

Member
avatar
加入于:
帖子: 7
声望: 5

我用的是自带的atr_rsi_strategy.py 文件 下面应该 load_bar加载历史数据了?
def on_init(self):
"""
Callback when strategy is inited.
"""
self.write_log("策略初始化")

    self.rsi_buy = 50 + self.rsi_entry
    self.rsi_sell = 50 - self.rsi_entry

    self.load_bar(10)
Administrator
avatar
加入于:
帖子: 4550
声望: 325

这里的写法是加载了的

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】