Esempio n. 1
0
 def applyFlags(self, ts):
     _sell_list = [
         ts.index[i] for (i, slope) in TS.roll_intersect(ts, -100) if slope
     ]
     _buy_list = [
         ts.index[i] for (i, slope) in TS.roll_intersect(ts, 100)
         if not slope
     ]
     return dict(sell=_sell_list, buy=_buy_list)
Esempio n. 2
0
 def applyFlags(self, ts):
   _sell_list = []
   _buy_list  = []
   direction  = None
   
   _sell_list = [ ts.index[i] for (i, slope) in TS.roll_intersect(ts, 70) if slope ]
   _buy_list = [ ts.index[i] for (i, slope) in TS.roll_intersect(ts, 30) if not slope ]
   
   return dict( sell = _sell_list, buy = _buy_list )
Esempio n. 3
0
    def applyFlags(self, ts1, ts2):
        _overbought_list = [
            self.index[i]
            for (i, direction) in TS.roll_intersect(ts1, self.series['close'])
            if direction
        ]
        _oversold_list = [
            self.index[i]
            for (i, direction) in TS.roll_intersect(ts2, self.series['close'])
            if not direction
        ]

        return dict(oversold=_oversold_list, overbought=_overbought_list)
Esempio n. 4
0
    def applyFlags(self, ts):
        _sell_list = []
        _buy_list = []
        direction = None

        _sell_list = [
            ts.index[i] for (i, slope) in TS.roll_intersect(ts, 70) if slope
        ]
        _buy_list = [
            ts.index[i] for (i, slope) in TS.roll_intersect(ts, 30)
            if not slope
        ]

        return dict(sell=_sell_list, buy=_buy_list)
Esempio n. 5
0
 def applyFlags(self, ts1, ts2):
   _sell_list = []
   _buy_list  = []
   direction  = None
   for i, direction in TS.roll_intersect(ts1, ts2):
     if direction:
       _buy_list.append( self.index[i] )
     else:
       _sell_list.append( self.index[i] )
                  
   return dict( sell = _sell_list, buy = _buy_list )
Esempio n. 6
0
    def applyFlags(self, ts1, ts2):
        _sell_list = []
        _buy_list = []
        direction = None
        for i, direction in TS.roll_intersect(ts1, ts2):
            if direction:
                _buy_list.append(self.index[i])
            else:
                _sell_list.append(self.index[i])

        return dict(sell=_sell_list, buy=_buy_list)
Esempio n. 7
0
 def applyFlags(self, ts):
   _sell_list = [ ts.index[i] for (i, slope) in TS.roll_intersect(ts, -100) if slope ]
   _buy_list = [ ts.index[i] for (i, slope) in TS.roll_intersect(ts, 100) if not slope ]
   return dict( sell = _sell_list, buy = _buy_list )
Esempio n. 8
0
 def applyFlags(self, ts1, ts2):
   _overbought_list   = [ self.index[i] for (i, direction) in TS.roll_intersect(ts1, self.series['close']) if direction ] 
   _oversold_list = [ self.index[i] for (i, direction) in TS.roll_intersect(ts2, self.series['close'] ) if not direction ]
       
   return dict( oversold = _oversold_list, overbought = _overbought_list )