请问一下,为何vscode总是报错,提示talib.AROON找不到?
我按照老师的方法ctrl+j 里面先检测了AROON的指标,见下:
import talib
print(talib.AROON.doc)
AROON(high, low[, timeperiod=?])
Aroon (Momentum Indicators)
Inputs:
prices: ['high', 'low']
Parameters:
timeperiod: 14
Outputs:
aroondown
aroonup
可是在下面总是提醒我 talib没有AROON指标
class NewArrayManager(ArrayManager):
def __init__(self, size=100):
super().__init__(size=size)
def aroon(self,n,array=False):
""""""
aroon_up,aroon_down = talib.AROON(
self.high,self.low,n
)
if array:
return aroon_up,aroon_down
return aroon_up[-1],aroon_down[-1]