Exemple #1
0
 def _boll(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     upper, middle, lower =  talib.BBANDS(data, n, 2, 2)
     return (upper, middle, lower)
Exemple #2
0
 def _moving_average(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     return talib.SMA(data, n)
Exemple #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)
Exemple #4
0
 def _boll(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     upper, middle, lower =  talib.BBANDS(data, n, 2, 2)
     return (upper, middle, lower)
Exemple #5
0
 def _moving_average(self, data, n):
     """ 向量化运行的均值函数。 """
     data = transform2ndarray(data)
     return talib.SMA(data, n)
Exemple #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)