# ematimesd510 = noNaN(np.c_[ times[1:], (ema5[1:]-ema10[:-1])/inputs['close'][1:] ], 1) ematimesd510 = noNaN(np.c_[ times[1:], ( (ema5[1:] - ema10[1:])-(ema5[:-1] - ema10[:-1]) ) / inputs['close'][1:] ], 1) addToDict(ematimesd510, ticker, "EMAD510") # #ema3 - ema7 # ema3 = ta.abstract.Function('ema')(inputs, timeperiod=3) # ema7 = ta.abstract.Function('ema')(inputs, timeperiod=7) # ematimes37 = noNaN(np.c_[ times, (ema3-ema7)/inputs['close'] ], 1) # addToDict(ematimes37, ticker, "EMA37") # # d/dt (ema3-ema7) # ematimesd37 = noNaN(np.c_[ times[1:], (ema3[1:]-ema7[:-1])/inputs['close'][1:] ], 1) # addToDict(ematimesd37, ticker, "EMAD37") # know sure thing http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:know_sure_thing_kst ksttimes = noNaN(np.c_[ times, ind.kst(inputs['close']) ], 1) addToDict(ksttimes, ticker, "KST") # all indicators below indicators = ["BBANDS","DEMA","EMA","SAR","SAREXT", "ADX","ADXR","APO","AROON", \ "AROONOSC","BOP","CCI","CMO","DX","MACD","MACDEXT", "MACDFIX","MFI", \ "MINUS_DI","MINUS_DM","MOM","ROC", "RSI","STOCH","STOCHF","STOCHRSI", \ "WILLR","AD","ADOSC","HT_DCPERIOD","HT_DCPHASE", "HT_SINE","NATR","TRANGE" ] functiongroups = ta.get_function_groups() for fname in indicators: fn = ta.abstract.Function(fname) # skip candlesticks crap if(fname in functiongroups['Pattern Recognition']): continue
(ema5[:-1] - ema10[:-1])) / inputs['close'][1:]], 1) addToDict(ematimesd510, ticker, "EMAD510") # #ema3 - ema7 # ema3 = ta.abstract.Function('ema')(inputs, timeperiod=3) # ema7 = ta.abstract.Function('ema')(inputs, timeperiod=7) # ematimes37 = noNaN(np.c_[ times, (ema3-ema7)/inputs['close'] ], 1) # addToDict(ematimes37, ticker, "EMA37") # # d/dt (ema3-ema7) # ematimesd37 = noNaN(np.c_[ times[1:], (ema3[1:]-ema7[:-1])/inputs['close'][1:] ], 1) # addToDict(ematimesd37, ticker, "EMAD37") # know sure thing http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:know_sure_thing_kst ksttimes = noNaN(np.c_[times, ind.kst(inputs['close'])], 1) addToDict(ksttimes, ticker, "KST") # all indicators below indicators = ["BBANDS","DEMA","EMA","SAR","SAREXT", "ADX","ADXR","APO","AROON", \ "AROONOSC","BOP","CCI","CMO","DX","MACD","MACDEXT", "MACDFIX","MFI", \ "MINUS_DI","MINUS_DM","MOM","ROC", "RSI","STOCH","STOCHF","STOCHRSI", \ "WILLR","AD","ADOSC","HT_DCPERIOD","HT_DCPHASE", "HT_SINE","NATR","TRANGE" ] functiongroups = ta.get_function_groups() for fname in indicators: fn = ta.abstract.Function(fname) # skip candlesticks crap if (fname in functiongroups['Pattern Recognition']): continue
"ema3minus7", bkgtimes, sigtimes, longname="(ema3-ema7)/close") # d/dt (ema3-ema7) ematimesd37 = noNaN( np.c_[times[1:], (ema3[1:] - ema7[:-1]) / inputs['close'][1:]], 1) addToSigBkgDict(ematimesd37, "ddtema3minus7", bkgtimes, sigtimes, longname="ddt(ema3-ema7)/close") # know sure thing http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:know_sure_thing_kst ksttimes = noNaN(np.c_[times, ind.kst(inputs['close'])], 1) addToSigBkgDict(ksttimes, "KST", bkgtimes, sigtimes, longname="Know Sure Thing (KST)") # know sure thing with hull moving average ksthmatimes = noNaN(np.c_[times, ind.hma(ind.kst(inputs['close']))], 1) addToSigBkgDict(ksthmatimes, "KSTHMA", bkgtimes, sigtimes, longname="Know Sure Thing (KST) with HMA") # diff b/w KST with HMA and KST without HMA
ematimesd510 = noNaN(np.c_[ times[1:], (ema5[1:]-ema10[:-1])/inputs['close'][1:] ], 1) addToSigBkgDict(ematimesd510, "ddtema5minus10", bkgtimes, sigtimes, longname="ddt(ema5-ema10)/close") #ema3 - ema7 ema3 = ta.abstract.Function('ema')(inputs, timeperiod=3) ema7 = ta.abstract.Function('ema')(inputs, timeperiod=7) ematimes37 = noNaN(np.c_[ times, (ema3-ema7)/inputs['close'] ], 1) addToSigBkgDict(ematimes37, "ema3minus7", bkgtimes, sigtimes, longname="(ema3-ema7)/close") # d/dt (ema3-ema7) ematimesd37 = noNaN(np.c_[ times[1:], (ema3[1:]-ema7[:-1])/inputs['close'][1:] ], 1) addToSigBkgDict(ematimesd37, "ddtema3minus7", bkgtimes, sigtimes, longname="ddt(ema3-ema7)/close") # know sure thing http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:know_sure_thing_kst ksttimes = noNaN(np.c_[ times, ind.kst(inputs['close']) ], 1) addToSigBkgDict(ksttimes, "KST", bkgtimes, sigtimes, longname="Know Sure Thing (KST)") # know sure thing with hull moving average ksthmatimes = noNaN(np.c_[ times, ind.hma(ind.kst(inputs['close'])) ], 1) addToSigBkgDict(ksthmatimes, "KSTHMA", bkgtimes, sigtimes, longname="Know Sure Thing (KST) with HMA") # diff b/w KST with HMA and KST without HMA kstdiff = noNaN(np.c_[ times, ind.kst(inputs['close'])-ind.hma(ind.kst(inputs['close'])) ], 1) addToSigBkgDict(kstdiff, "KSTDIFF", bkgtimes, sigtimes, longname="KST HMA - KST") # all indicators below indicators = ["BBANDS","DEMA","EMA","HT_TRENDLINE","KAMA","MA","MAMA","MIDPOINT","MIDPRICE","SAR","SAREXT","SMA", \ "T3","TEMA","TRIMA","WMA","ADX","ADXR","APO","AROON","AROONOSC","BOP","CCI","CMO","DX","MACD","MACDEXT", \ "MACDFIX","MFI","MINUS_DI","MINUS_DM","MOM","PLUS_DI","PLUS_DM","PPO","ROC","ROCP","ROCR","ROCR100", \ "RSI","STOCH","STOCHF","STOCHRSI","TRIX","ULTOSC","WILLR","AD","ADOSC","OBV","HT_DCPERIOD","HT_DCPHASE", \