コード例 #1
0
 def __init__(self, batches, pack):
     self.var = VARIANCE(120, 'close')
     self.max = MAX(120, 'high')
     self.min = MIN(120, 'low')
     self.close = CLOSE()
     self.batches = batches
     self.interval = {}
     self.bought_grid = {}
     self.bought_price = {}
     self.bought_amount = {}
     self.sold_grid = {}
     self.sold_price = {}
     self.sold_amount = {}
     self.count = 0
     self.pack = pack
コード例 #2
0
 def __init__(self):
     short_sma = MA(10, 'close')
     long_sma = MA(30, 'close')
     filter = (MAX(10, 'close') / MIN(10, 'close')) > 1.02
     self.signal = (short_sma - long_sma)[filter]
コード例 #3
0
 def __init__(self):
     filtering = (MAX(10, 'close') / MIN(10, 'close')) >= 1.02
     indicator = MA(10, 'close') - MA(120, 'close')
     self.signal = indicator[filtering]
コード例 #4
0
 def __init__(self):
     self.preMax = MAX(10, 'close').shift(1)
     self.preMin = MIN(10, 'close').shift(1)
     self.maxOI = MAX(10, 'openInterest')
     self.current = CLOSE()
     self.count = 0
コード例 #5
0
 def __init__(self):
     self.preMax = MAX(10, 'close').shift(1)
     self.preMin = MIN(10, 'close').shift(1)
     self.current = CLOSE()
     self.count = 0