402 Star 1.8K Fork 739

GVPfasiondog / hikyuu

 / 详情

004-IndicatorOverview.ipynb ta-lib RuntimeError: boost::bad_any_cast: failed conversion using boost::any_cast

已完成
创建于  
2017-07-21 21:03

2.3 TA-Lib包装指标¶
由于内建指标还不完整,在交互工具里对TA-Lib进行了包装,命名方式统一为 TA_FUNC名称。其中,ta-lib指标的lookback属性,用discard属性代替。
In [23]:

x = TA_SMA(CLOSE(k))
print(x)
x.plot()

print(x.discard)

RuntimeError Traceback (most recent call last)
in ()
----> 1 x = TA_SMA(CLOSE(k))
2 print(x)
3 x.plot()
4
5 print(x.discard)

~/hikyuu/tools/hikyuu/indicator/init.py in TA_SMA(ind, timeperiod)
881 params={'timeperiod': timeperiod})
882 if ind is not None:
--> 883 imp.calculate(ind)
884 return Indicator(imp)
885

~/hikyuu/tools/hikyuu/indicator/init.py in tawrap_calculate(self, ind)
254 func_params = {}
255 for name in param_names:
--> 256 func_params[name] = self.getParam(name)
257
258 self._tafunc.set_parameters(func_params)

RuntimeError: boost::bad_any_cast: failed conversion using boost::any_cast

评论 (1)

pchaos 创建了任务

已经搞定,和那个test的错误一样,请验证

fasiondog 关闭了任务

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
3859 fasiondog 1578914213
C++
1
https://gitee.com/fasiondog/hikyuu.git
git@gitee.com:fasiondog/hikyuu.git
fasiondog
hikyuu
hikyuu

搜索帮助

14c37bed 8189591 565d56ea 8189591