vn.py量化社区
By Traders, For Traders.
Member
avatar
加入于:
帖子: 29
声望: 1

During handling of the above exception, another exception occurred:

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 "D:\yxl _vny\vnpy\app\cta_backtester\engine.py", line 172, in run_backtesting
engine.run_backtesting()
File "D:\yxl _vny\vnpy\app\cta_strategy\backtesting.py", line 293, in run_backtesting
func(data)
File "D:\yxl _vny\vnpy\app\cta_strategy\backtesting.py", line 722, in new_bar
self.strategy.on_bar(bar)
File "D:\yxl _vny\strategies\cuatro.py", line 96, in on_bar
self.bg.update_bar(bar)
File "D:\yxl _vny\vnpy\trader\utility.py", line 282, in update_bar
self.on_window_bar(self.window_bar)
File "D:\yxl _vny\strategies\cuatro.py", line 134, in on_min_bar
slow_ma=am.ema(self.ema_windwow,array=True)
File "D:\yxl _vny\vnpy\trader\utility.py", line 386, in ema
result = talib.EMA(self.close, n)
File "C:\vnstudio\lib\site-packages\talib__init__.py", line 24, in wrapper
return func(
args, **kwargs)
File "_func.pxi", line 7099, in talib._ta_lib.EMA
File "_common.pxi", line 30, in talib._ta_lib._ta_check_success
Exception: TA_EMA function failed with error code 2: Bad Parameter (TA_BAD_PARAM)

Administrator
avatar
加入于:
帖子: 4028
声望: 221

请检查下你的EMA均线窗口是否用了负数或者0

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