<s> """<STR_LIT>""" <EOL> import talib <EOL> import numpy <EOL> def value_ds_to_numpy ( ds , count ) : <EOL> ret = None <EOL> try : <EOL> values = ds [ count * - <NUM_LIT:1> : ] <EOL> ret = numpy . array ( [ float ( value ) for value in values ] ) <EOL> except IndexError : <EOL> pass <EOL> except TypeError : <EOL> pass <EOL> return ret <EOL> def bar_ds_open_to_numpy ( barDs , count ) : <EOL> return value_ds_to_numpy ( barDs . getOpenDataSeries ( ) , count ) <EOL> def bar_ds_high_to_numpy ( barDs , count ) : <EOL> return value_ds_to_numpy ( barDs . getHighDataSeries ( ) , count ) <EOL> def bar_ds_low_to_numpy ( barDs , count ) : <EOL> return value_ds_to_numpy ( barDs . getLowDataSeries ( ) , count ) <EOL> def bar_ds_close_to_numpy ( barDs , count ) : <EOL> return value_ds_to_numpy ( barDs . getCloseDataSeries ( ) , count ) <EOL> def bar_ds_volume_to_numpy ( barDs , count ) : <EOL> return value_ds_to_numpy ( barDs . getVolumeDataSeries ( ) , count ) <EOL> def call_talib_with_ds ( ds , count , talibFunc , * args , ** kwargs ) : <EOL> data = value_ds_to_numpy ( ds , count ) <EOL> if data is None : <EOL> return None <EOL> return talibFunc ( data , * args , ** kwargs ) <EOL> def call_talib_with_hlcv ( barDs , count , talibFunc , * args , ** kwargs ) : <EOL> high = bar_ds_high_to_numpy ( barDs , count ) <EOL> if high is None : <EOL> return None <EOL> low = bar_ds_low_to_numpy ( barDs , count ) <EOL> if low is None : <EOL> return None <EOL> close = bar_ds_close_to_numpy ( barDs , count ) <EOL> if close is None : <EOL> return None <EOL> volume = bar_ds_volume_to_numpy ( barDs , count ) <EOL> if volume is None : <EOL> return None <EOL> return talibFunc ( high , low , close , volume , * args , ** kwargs ) <EOL> def call_talib_with_hlc ( barDs , count , talibFunc , * args , ** kwargs ) : <EOL> high = bar_ds_high_to_numpy ( barDs , count ) <EOL> if high is None : <EOL> return None <EOL> low = bar_ds_low_to_numpy ( barDs , count ) <EOL> if low is None : <EOL> return None <EOL> close = bar_ds_close_to_numpy ( barDs , count ) <EOL> if close is None : <EOL> return None <EOL> return talibFunc ( high , low , close , * args , ** kwargs ) <EOL> def call_talib_with_ohlc ( barDs , count , talibFunc , * args , ** kwargs ) : <EOL> open_ = bar_ds_open_to_numpy ( barDs , count ) <EOL> if open_ is None : <EOL> return None <EOL> high = bar_ds_high_to_numpy ( barDs , count ) <EOL> if high is None : <EOL> return None <EOL> low = bar_ds_low_to_numpy ( barDs , count ) <EOL> if low is None : <EOL> return None <EOL> close = bar_ds_close_to_numpy ( barDs , count ) <EOL> if close is None : <EOL> return None <EOL> return talibFunc ( open_ , high , low , close , * args , ** kwargs ) <EOL> def call_talib_with_hl ( barDs , count , talibFunc , * args , ** kwargs ) : <EOL> high = bar_ds_high_to_numpy ( barDs , count ) <EOL> if high is None : <EOL> return None <EOL> low = bar_ds_low_to_numpy ( barDs , count ) <EOL> if low is None : <EOL> return None <EOL> return talibFunc ( high , low , * args , ** kwargs ) <EOL> def AD ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlcv ( barDs , count , talib . AD ) <EOL> def ADOSC ( barDs , count , fastperiod = - <NUM_LIT:2> ** <NUM_LIT> , slowperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlcv ( barDs , count , talib . ADOSC , fastperiod , slowperiod ) <EOL> def ADX ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . ADX , timeperiod ) <EOL> def ADXR ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . ADXR , timeperiod ) <EOL> def APO ( ds , count , fastperiod = - <NUM_LIT:2> ** <NUM_LIT> , slowperiod = - <NUM_LIT:2> ** <NUM_LIT> , matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . APO , fastperiod , slowperiod , matype ) <EOL> def AROON ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_hl ( barDs , count , talib . AROON , timeperiod ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def AROONOSC ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . AROONOSC , timeperiod ) <EOL> def ATR ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . ATR , timeperiod ) <EOL> def AVGPRICE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . AVGPRICE ) <EOL> def BBANDS ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , nbdevup = - <NUM_LIT> , nbdevdn = - <NUM_LIT> , matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . BBANDS , timeperiod , nbdevup , nbdevdn , matype ) <EOL> if ret is None : <EOL> ret = ( None , None , None ) <EOL> return ret <EOL> def BETA ( ds1 , ds2 , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> data1 = value_ds_to_numpy ( ds1 , count ) <EOL> if data1 is None : <EOL> return None <EOL> data2 = value_ds_to_numpy ( ds2 , count ) <EOL> if data2 is None : <EOL> return None <EOL> return talib . BETA ( data1 , data2 , timeperiod ) <EOL> def BOP ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . BOP ) <EOL> def CCI ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . CCI , timeperiod ) <EOL> def CDL2CROWS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL2CROWS ) <EOL> def CDL3BLACKCROWS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3BLACKCROWS ) <EOL> def CDL3INSIDE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3INSIDE ) <EOL> def CDL3LINESTRIKE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3LINESTRIKE ) <EOL> def CDL3OUTSIDE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3OUTSIDE ) <EOL> def CDL3STARSINSOUTH ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3STARSINSOUTH ) <EOL> def CDL3WHITESOLDIERS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDL3WHITESOLDIERS ) <EOL> def CDLABANDONEDBABY ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLABANDONEDBABY , penetration ) <EOL> def CDLADVANCEBLOCK ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLADVANCEBLOCK ) <EOL> def CDLBELTHOLD ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLBELTHOLD ) <EOL> def CDLBREAKAWAY ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLBREAKAWAY ) <EOL> def CDLCLOSINGMARUBOZU ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLCLOSINGMARUBOZU ) <EOL> def CDLCONCEALBABYSWALL ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLCONCEALBABYSWALL ) <EOL> def CDLCOUNTERATTACK ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLCOUNTERATTACK ) <EOL> def CDLDARKCLOUDCOVER ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLDARKCLOUDCOVER , penetration ) <EOL> def CDLDOJI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLDOJI ) <EOL> def CDLDOJISTAR ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLDOJISTAR ) <EOL> def CDLDRAGONFLYDOJI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLDRAGONFLYDOJI ) <EOL> def CDLENGULFING ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLENGULFING ) <EOL> def CDLEVENINGDOJISTAR ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLEVENINGDOJISTAR , penetration ) <EOL> def CDLEVENINGSTAR ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLEVENINGSTAR , penetration ) <EOL> def CDLGAPSIDESIDEWHITE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLGAPSIDESIDEWHITE ) <EOL> def CDLGRAVESTONEDOJI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLGRAVESTONEDOJI ) <EOL> def CDLHAMMER ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHAMMER ) <EOL> def CDLHANGINGMAN ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHANGINGMAN ) <EOL> def CDLHARAMI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHARAMI ) <EOL> def CDLHARAMICROSS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHARAMICROSS ) <EOL> def CDLHIGHWAVE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHIGHWAVE ) <EOL> def CDLHIKKAKE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHIKKAKE ) <EOL> def CDLHIKKAKEMOD ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHIKKAKEMOD ) <EOL> def CDLHOMINGPIGEON ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLHOMINGPIGEON ) <EOL> def CDLIDENTICAL3CROWS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLIDENTICAL3CROWS ) <EOL> def CDLINNECK ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLINNECK ) <EOL> def CDLINVERTEDHAMMER ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLINVERTEDHAMMER ) <EOL> def CDLKICKING ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLKICKING ) <EOL> def CDLKICKINGBYLENGTH ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLKICKINGBYLENGTH ) <EOL> def CDLLADDERBOTTOM ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLLADDERBOTTOM ) <EOL> def CDLLONGLEGGEDDOJI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLLONGLEGGEDDOJI ) <EOL> def CDLLONGLINE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLLONGLINE ) <EOL> def CDLMARUBOZU ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLMARUBOZU ) <EOL> def CDLMATCHINGLOW ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLMATCHINGLOW ) <EOL> def CDLMATHOLD ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLMATHOLD , penetration ) <EOL> def CDLMORNINGDOJISTAR ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLMORNINGDOJISTAR , penetration ) <EOL> def CDLMORNINGSTAR ( barDs , count , penetration = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLMORNINGSTAR , penetration ) <EOL> def CDLONNECK ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLONNECK ) <EOL> def CDLPIERCING ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLPIERCING ) <EOL> def CDLRICKSHAWMAN ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLRICKSHAWMAN ) <EOL> def CDLRISEFALL3METHODS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLRISEFALL3METHODS ) <EOL> def CDLSEPARATINGLINES ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSEPARATINGLINES ) <EOL> def CDLSHOOTINGSTAR ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSHOOTINGSTAR ) <EOL> def CDLSHORTLINE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSHORTLINE ) <EOL> def CDLSPINNINGTOP ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSPINNINGTOP ) <EOL> def CDLSTALLEDPATTERN ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSTALLEDPATTERN ) <EOL> def CDLSTICKSANDWICH ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLSTICKSANDWICH ) <EOL> def CDLTAKURI ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLTAKURI ) <EOL> def CDLTASUKIGAP ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLTASUKIGAP ) <EOL> def CDLTHRUSTING ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLTHRUSTING ) <EOL> def CDLTRISTAR ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLTRISTAR ) <EOL> def CDLUNIQUE3RIVER ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLUNIQUE3RIVER ) <EOL> def CDLUPSIDEGAP2CROWS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLUPSIDEGAP2CROWS ) <EOL> def CDLXSIDEGAP3METHODS ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ohlc ( barDs , count , talib . CDLXSIDEGAP3METHODS ) <EOL> def CMO ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . CMO , timeperiod ) <EOL> def CORREL ( ds1 , ds2 , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> data1 = value_ds_to_numpy ( ds1 , count ) <EOL> if data1 is None : <EOL> return None <EOL> data2 = value_ds_to_numpy ( ds2 , count ) <EOL> if data2 is None : <EOL> return None <EOL> return talib . CORREL ( data1 , data2 , timeperiod ) <EOL> def DEMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . DEMA , timeperiod ) <EOL> def DX ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . DX , timeperiod ) <EOL> def EMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . EMA , timeperiod ) <EOL> def HT_DCPERIOD ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . HT_DCPERIOD ) <EOL> def HT_DCPHASE ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . HT_DCPHASE ) <EOL> def HT_PHASOR ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . HT_PHASOR ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def HT_SINE ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . HT_SINE ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def HT_TRENDLINE ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . HT_TRENDLINE ) <EOL> def HT_TRENDMODE ( ds , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . HT_TRENDMODE ) <EOL> def KAMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . KAMA , timeperiod ) <EOL> def LINEARREG ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . LINEARREG , timeperiod ) <EOL> def LINEARREG_ANGLE ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . LINEARREG_ANGLE , timeperiod ) <EOL> def LINEARREG_INTERCEPT ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . LINEARREG_INTERCEPT , timeperiod ) <EOL> def LINEARREG_SLOPE ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . LINEARREG_SLOPE , timeperiod ) <EOL> def MA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MA , timeperiod , matype ) <EOL> def MACD ( ds , count , fastperiod = - <NUM_LIT:2> ** <NUM_LIT> , slowperiod = - <NUM_LIT:2> ** <NUM_LIT> , signalperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MACD , fastperiod , slowperiod , signalperiod ) <EOL> if ret is None : <EOL> ret = ( None , None , None ) <EOL> return ret <EOL> def MACDEXT ( ds , count , fastperiod = - <NUM_LIT:2> ** <NUM_LIT> , fastmatype = <NUM_LIT:0> , slowperiod = - <NUM_LIT:2> ** <NUM_LIT> , slowmatype = <NUM_LIT:0> , signalperiod = - <NUM_LIT:2> ** <NUM_LIT> , signalmatype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MACDEXT , fastperiod , fastmatype , slowperiod , slowmatype , signalperiod , signalmatype ) <EOL> if ret is None : <EOL> ret = ( None , None , None ) <EOL> return ret <EOL> def MACDFIX ( ds , count , signalperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MACDFIX , signalperiod ) <EOL> if ret is None : <EOL> ret = ( None , None , None ) <EOL> return ret <EOL> def MAMA ( ds , count , fastlimit = - <NUM_LIT> , slowlimit = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MAMA , fastlimit , slowlimit ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def MAX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MAX , timeperiod ) <EOL> def MAXINDEX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MAXINDEX , timeperiod ) <EOL> def MEDPRICE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . MEDPRICE ) <EOL> def MFI ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlcv ( barDs , count , talib . MFI , timeperiod ) <EOL> def MIDPOINT ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MIDPOINT , timeperiod ) <EOL> def MIDPRICE ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . MIDPRICE , timeperiod ) <EOL> def MIN ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MIN , timeperiod ) <EOL> def MININDEX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MININDEX , timeperiod ) <EOL> def MINMAX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MINMAX , timeperiod ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def MINMAXINDEX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . MINMAXINDEX , timeperiod ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def MINUS_DI ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . MINUS_DI , timeperiod ) <EOL> def MINUS_DM ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . MINUS_DM , timeperiod ) <EOL> def MOM ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . MOM , timeperiod ) <EOL> def NATR ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . NATR , timeperiod ) <EOL> def OBV ( ds1 , volumeDs , count ) : <EOL> """<STR_LIT>""" <EOL> data1 = value_ds_to_numpy ( ds1 , count ) <EOL> if data1 is None : <EOL> return None <EOL> data2 = value_ds_to_numpy ( volumeDs , count ) <EOL> if data2 is None : <EOL> return None <EOL> return talib . OBV ( data1 , data2 ) <EOL> def PLUS_DI ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . PLUS_DI , timeperiod ) <EOL> def PLUS_DM ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . PLUS_DM , timeperiod ) <EOL> def PPO ( ds , count , fastperiod = - <NUM_LIT:2> ** <NUM_LIT> , slowperiod = - <NUM_LIT:2> ** <NUM_LIT> , matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . PPO , fastperiod , slowperiod , matype ) <EOL> def ROC ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . ROC , timeperiod ) <EOL> def ROCP ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . ROCP , timeperiod ) <EOL> def ROCR ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . ROCR , timeperiod ) <EOL> def ROCR100 ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . ROCR100 , timeperiod ) <EOL> def RSI ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . RSI , timeperiod ) <EOL> def SAR ( barDs , count , acceleration = - <NUM_LIT> , maximum = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . SAR , acceleration , maximum ) <EOL> def SAREXT ( barDs , count , startvalue = - <NUM_LIT> , offsetonreverse = - <NUM_LIT> , accelerationinitlong = - <NUM_LIT> , accelerationlong = - <NUM_LIT> , accelerationmaxlong = - <NUM_LIT> , accelerationinitshort = - <NUM_LIT> , accelerationshort = - <NUM_LIT> , accelerationmaxshort = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hl ( barDs , count , talib . SAREXT , startvalue , offsetonreverse , accelerationinitlong , accelerationlong , accelerationmaxlong , accelerationinitshort , accelerationshort , accelerationmaxshort ) <EOL> def SMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . SMA , timeperiod ) <EOL> def STDDEV ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , nbdev = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . STDDEV , timeperiod , nbdev ) <EOL> def STOCH ( barDs , count , fastk_period = - <NUM_LIT:2> ** <NUM_LIT> , slowk_period = - <NUM_LIT:2> ** <NUM_LIT> , slowk_matype = <NUM_LIT:0> , slowd_period = - <NUM_LIT:2> ** <NUM_LIT> , slowd_matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_hlc ( barDs , count , talib . STOCH , fastk_period , slowk_period , slowk_matype , slowd_period , slowd_matype ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def STOCHF ( barDs , count , fastk_period = - <NUM_LIT:2> ** <NUM_LIT> , fastd_period = - <NUM_LIT:2> ** <NUM_LIT> , fastd_matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_hlc ( barDs , count , talib . STOCHF , fastk_period , fastd_period , fastd_matype ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def STOCHRSI ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , fastk_period = - <NUM_LIT:2> ** <NUM_LIT> , fastd_period = - <NUM_LIT:2> ** <NUM_LIT> , fastd_matype = <NUM_LIT:0> ) : <EOL> """<STR_LIT>""" <EOL> ret = call_talib_with_ds ( ds , count , talib . STOCHRSI , timeperiod , fastk_period , fastd_period , fastd_matype ) <EOL> if ret is None : <EOL> ret = ( None , None ) <EOL> return ret <EOL> def SUM ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . SUM , timeperiod ) <EOL> def T3 ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , vfactor = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . T3 , timeperiod , vfactor ) <EOL> def TEMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . TEMA , timeperiod ) <EOL> def TRANGE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . TRANGE ) <EOL> def TRIMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . TRIMA , timeperiod ) <EOL> def TRIX ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . TRIX , timeperiod ) <EOL> def TSF ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . TSF , timeperiod ) <EOL> def TYPPRICE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . TYPPRICE ) <EOL> def ULTOSC ( barDs , count , timeperiod1 = - <NUM_LIT:2> ** <NUM_LIT> , timeperiod2 = - <NUM_LIT:2> ** <NUM_LIT> , timeperiod3 = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . ULTOSC , timeperiod1 , timeperiod2 , timeperiod3 ) <EOL> def VAR ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> , nbdev = - <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . VAR , timeperiod , nbdev ) <EOL> def WCLPRICE ( barDs , count ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . WCLPRICE ) <EOL> def WILLR ( barDs , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_hlc ( barDs , count , talib . WILLR , timeperiod ) <EOL> def WMA ( ds , count , timeperiod = - <NUM_LIT:2> ** <NUM_LIT> ) : <EOL> """<STR_LIT>""" <EOL> return call_talib_with_ds ( ds , count , talib . WMA , timeperiod ) </s>
