Ejemplo n.º 1
0
 def __init__(self, inst, fast=7, slow=25, volume=1):
     Strategy.__init__(self, inst)
     threading.Thread.__init__(self)
     self.fast = fast
     self.slow = slow
     self.volume = volume
     self.InitIndicator()
Ejemplo n.º 2
0
 def __init__(self, inst, fast = 7, slow = 25, volume = 1):
     Strategy.__init__(self, inst)
     threading.Thread.__init__(self)
     self.fast = fast
     self.slow = slow
     self.volume = volume
     self.InitIndicator()
Ejemplo n.º 3
0
Archivo: Chase.py Proyecto: sature/rich
 def __init__(self, k, amount=1):
     S.__init__(self, k, amount)
     self.status = 'clean_hands'  # clean_hands/holding_buy/holding_sell
     self.amount = amount
     self.holding = 0
     self.set_name('Chase')
     # self.contract = None
     logger.info('Create Strategy %s' % self.name)
Ejemplo n.º 4
0
    def __init__(self, inst, volume = 1):
        Strategy.__init__(self, inst)
        threading.Thread.__init__(self)
        self.volume = volume
        self.InitIndicator()

        self.b_limit = 0
        self.s_limit = 0
Ejemplo n.º 5
0
 def __init__(self, symbol, fast_time, slow_time, signal_time):
     Strategy.__init__(self, symbol)
     self.fast_ema = EMA(0)
     self.slow_ema = EMA(0)
     self.signal_ema = EMA(0)
     self.fast_time = fast_time
     self.slow_time = slow_time
     self.signal_time = signal_time
     self.prev_hist = 0
Ejemplo n.º 6
0
 def __init__(self, **kw):
   Strategy.__init__(self, **kw)
   self.preds = []
Ejemplo n.º 7
0
 def __init__(self, symbol, lookback):
     Strategy.__init__(self, symbol)
     self.sma = MovingSum(lookback)
     self.price_act = MovingSum(3)
Ejemplo n.º 8
0
 def __init__(self, inst, volume = 1):
     Strategy.__init__(self, inst)
     threading.Thread.__init__(self)
     self.volume = volume
     self.InitIndicator()
Ejemplo n.º 9
0
 def __init__(self, avTechIndicatorObj):
     Strategy.__init__(self, avTechIndicatorObj)
     self.function = {
         util.SMA: avTechIndicatorObj.get_sma,
         util.EMA: avTechIndicatorObj.get_ema
     }
Ejemplo n.º 10
0
 def __init__(self, tick):
     Strategy.__init__(self, tick)
     threading.Thread.__init__(self)
Ejemplo n.º 11
0
 def __init__(self, avTechIndicatorObj):
     Strategy.__init__(self, avTechIndicatorObj)
Ejemplo n.º 12
0
 def __init__(self, x, y):
     self.x, self.y = x, y
     Strategy.__init__(self, self)
Ejemplo n.º 13
0
 def __init__(self):
     Strategy.__init__(self, self)
Ejemplo n.º 14
0
 def __init__(self, socket, connection, console):
     Strategy.__init__(self, socket, connection, console)
Ejemplo n.º 15
0
 def __init__(self, symbol, lookback):
     Strategy.__init__(self, symbol)
     self.pos_flow = MovingSum(lookback)
     self.neg_flow = MovingSum(lookback)
     self.lltp = 0
Ejemplo n.º 16
0
 def __init__(self, symbol, lookback, threshold):
     Strategy.__init__(self, symbol)
     self.traded_qty = MovingSum(lookback)
     self.returns = MovingSum(2 + lookback / 10)
     self.threshold = threshold
     self.continuous_traded_qty = 0