def __init__(self, data, n, name='BOLL', styles=('y', 'b', 'g'), lw=1):
     super(BOLL, self).__init__(name)
     ### @TODO 只有在逐步运算中需给self.values先赋值,
     ## 去掉逐步运算后删除
     #self.values = OrderedDict([
     #('upper', []),
     #('middler', []),
     #('lower', [])
     #])
     self._args = [ndarray(data), n, 2, 2]
 def __init__(self,
              open,
              close,
              volume,
              name='volume',
              colorup='r',
              colordown='b',
              width=1):
     super(Volume, self).__init__(name, None)
     self.values = ndarray(volume)
Beispiel #3
0
 def __init__(self, data, n, name='BOLL',
              styles=('y', 'b', 'g'), lw=1):
     super(BOLL, self).__init__(name)
     ### @TODO 只有在逐步运算中需给self.values先赋值,
     ## 去掉逐步运算后删除
     #self.values = OrderedDict([
             #('upper', []),
             #('middler', []),
             #('lower', [])
             #])
     self._args = [ndarray(data), n, 2, 2]
Beispiel #4
0
 def __init__(self, data, n, name='MA',
              style='y', lw=1):
     """ data (NumberSeries/np.ndarray/list) """
     super(MA, self).__init__(name)
     # 必须的函数参数
     self._args = [ndarray(data), n]
Beispiel #5
0
 def __init__(self, open, close, volume, name='volume',
              colorup='r', colordown='b', width=1):
     super(Volume, self).__init__(name, None)
     self.values = ndarray(volume)
Beispiel #6
0
 def __init__(self, data, n, name='MA',
              style='y', lw=1):
     """ data (NumberSeries/np.ndarray/list) """
     super(MA, self).__init__(name)
     # 必须的函数参数
     self._args = [ndarray(data), n]
Beispiel #7
0
 def __init__(self, data, name='MACD',
              style=('y','b','g', 'k--'), lw=1):
     super(MACD, self).__init__(name)
     self._args = [ndarray(data), 1]
Beispiel #8
0
 def __init__(self, data, name='TEST',
              style='y', lw=1):
     super(TEST, self).__init__(name)
     self._args = [ndarray(data), 1]