예제 #1
0
파일: cci.py 프로젝트: so-called-quant/RTA
 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)
예제 #2
0
파일: rsi.py 프로젝트: avinashpandit/RTA
 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 )
예제 #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)
예제 #4
0
파일: rsi.py 프로젝트: so-called-quant/RTA
    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)
예제 #5
0
파일: macd.py 프로젝트: avinashpandit/RTA
 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 )
예제 #6
0
파일: macd.py 프로젝트: so-called-quant/RTA
    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)
예제 #7
0
파일: cci.py 프로젝트: avinashpandit/RTA
 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 )
예제 #8
0
파일: bbands.py 프로젝트: avinashpandit/RTA
 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 )