コード例 #1
0
ファイル: macd.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   pivot, s1, s2, s3 = Indicators.MACD( self.series['close'], 
                               fastperiod = self.fastperiod,  
                               slowperiod = self.slowperiod,
                               signalperiod = self.signalperiod )
                               
   return ( pivot, common.padNans(s1, self.index), common.padNans(s2, self.index), common.padNans(s3, self.index) )
コード例 #2
0
    def calculate(self):
        pivot, s1, s2 = getattr(Indicators, self.func).__call__(
            self.series['high'], self.series['low'], self.series['close'],
            self.fastk_period, self.fastd_period, self.fastd_matype)

        return (pivot, common.padNans(s1, self.index),
                common.padNans(s2, self.index))
コード例 #3
0
ファイル: bbands.py プロジェクト: so-called-quant/RTA
    def calculate(self):
        pivot, s1, s2, s3 = Indicators.BBANDS(self.series['close'],
                                              self.timeperiod, self.nbdevup,
                                              self.nbdevdn, self.matype)

        return (pivot, common.padNans(s1, self.index),
                common.padNans(s2, self.index), common.padNans(s3, self.index))
コード例 #4
0
ファイル: macd.py プロジェクト: so-called-quant/RTA
    def calculate(self):
        pivot, s1, s2, s3 = Indicators.MACD(self.series['close'],
                                            fastperiod=self.fastperiod,
                                            slowperiod=self.slowperiod,
                                            signalperiod=self.signalperiod)

        return (pivot, common.padNans(s1, self.index),
                common.padNans(s2, self.index), common.padNans(s3, self.index))
コード例 #5
0
 def calculate(self):
   pivot, s1 = getattr(Indicators, self.func).__call__( self.series['open'], self.series['high'], 
                                               self.series['low'], 
                                               self.series['close'], 
                                               penetration = int(self.cget('penetration')) )
   
   return ( pivot, common.padNans(s1, self.index) )
コード例 #6
0
ファイル: accept_ohlc.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   pivot, s1 = getattr(Indicators, self.func).__call__( self.series['open'], 
                                                        self.series['low'],  
                                                        self.series['high'], 
                                                        self.series['close'] )
   
   print s1                           
   return ( pivot, common.padNans(s1, self.index) )
コード例 #7
0
    def calculate(self):
        pivot, s1 = getattr(Indicators,
                            self.func).__call__(self.series['high'],
                                                self.series['low'],
                                                self.series['close'],
                                                timeperiod=self.timeperiod)

        return (pivot, common.padNans(s1, self.index))
コード例 #8
0
    def calculate(self):
        pivot, s1 = getattr(Indicators,
                            self.func).__call__(self.series['open'],
                                                self.series['low'],
                                                self.series['high'],
                                                self.series['close'])

        print s1
        return (pivot, common.padNans(s1, self.index))
コード例 #9
0
    def calculate(self):
        pivot, s1 = getattr(Indicators,
                            self.func).__call__(self.series['open'],
                                                self.series['high'],
                                                self.series['low'],
                                                self.series['close'],
                                                penetration=int(
                                                    self.cget('penetration')))

        return (pivot, common.padNans(s1, self.index))
コード例 #10
0
 def calculate(self):
   pivot, s1 = getattr(Indicators, self.func).__call__(  self.series['close'], timeperiod = self.timeperiod )
                               
   return ( pivot, common.padNans(s1, self.index) )
コード例 #11
0
 def calculate(self):
     sr = self.series['close']
     idx = common._zigzag(sr, cutoff=self.cutoff())
     return (0, common.padNans(sr[idx], index=self.index[idx]))
コード例 #12
0
ファイル: cci.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   pivot, s = Indicators.CCI( self.series['high'], self.series['low'], 
                              self.series['close'], timeperiod = self.timeperiod() )
   return ( pivot, common.padNans(s, self.index) )
コード例 #13
0
ファイル: zigzag.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   sr = self.series['close']
   idx = common._zigzag( sr, cutoff = self.cutoff() )
   return ( 0, common.padNans( sr[idx], index= self.index[idx] ) )
コード例 #14
0
ファイル: bbands.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   pivot, s1, s2, s3 = Indicators.BBANDS( self.series['close'], 
                               self.timeperiod,  
                               self.nbdevup, self.nbdevdn, self.matype )
                               
   return ( pivot, common.padNans(s1, self.index), common.padNans(s2, self.index), common.padNans(s3, self.index) )
コード例 #15
0
ファイル: rsi.py プロジェクト: so-called-quant/RTA
 def calculate(self):
     pivot, s = Indicators.RSI(self.series['close'],
                               timeperiod=self.timeperiod())
     return (pivot, common.padNans(s, self.index))
コード例 #16
0
ファイル: stochastic_rsi.py プロジェクト: avinashpandit/RTA
 def calculate(self):
   pivot, s1, s2 = getattr(Indicators, self.func).__call__( self.series['close'], self.period, self.fastk_period, self.fastd_period, self.fastd_matype )
                               
   return ( pivot, common.padNans(s1, self.index), common.padNans(s2, self.index) )