Exemplo n.º 1
0
 def _boll(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     upper, middle, lower =  talib.BBANDS(data, n, 2, 2)
     return (upper, middle, lower)
Exemplo n.º 2
0
 def _moving_average(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     return talib.SMA(data, n)
Exemplo n.º 3
0
 def __init__(self, tracker, open, close, volume, name='volume', colorup='r', colordown='b', width=1):
     super(Volume, self).__init__(tracker, name)
     self.value = transform2ndarray(volume)
Exemplo n.º 4
0
 def _boll(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     upper, middle, lower =  talib.BBANDS(data, n, 2, 2)
     return (upper, middle, lower)
Exemplo n.º 5
0
 def _moving_average(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     return talib.SMA(data, n)
Exemplo n.º 6
0
 def __init__(self, tracker, open, close, volume, name='volume', colorup='r', colordown='b', width=1):
     super(Volume, self).__init__(tracker, name)
     self.value = transform2ndarray(volume)