def create_statesdaily(): for sym in symbol_list: for barsize in barlist : timeframe = bardict[barsize] durinseconds = secdict[barsize] barsizeNtimeframe = timeframe + barsize dur = barsize TicksUtile.assemble_dur_bars(today,sym,dur,durinseconds) DurBoth = rpu_rp.CsvToLines( DataDown+ today + '.'+sym+'.' + dur.replace(' ','') + '.both.csv') indlist = ['pivot', 'R', 'S', 'S2', 'R2'] for indicator in indlist: ## print sym indarr = rpInd.GetPivots(DurBoth,sym,indicator) statename = sym+'.'+dur.replace(' ','')+'.' statefile = statearea +statename + indicator + '.state.csv' rpu_rp.WriteArrayToCsvfile(statefile, indarr) indlist2 = ['kupper', 'klower', 'kmid'] for indicator in indlist2: ## print indicator indarr = rpInd.GetKupper(DurBoth,sym,indicator) statename = sym+'.'+dur.replace(' ','')+'.' statefile = statearea +statename + indicator + '.state.csv' rpu_rp.WriteArrayToCsvfile(statefile, indarr) ## keltner_channel_upper(highs,lows,closes,mult) indlist3 = ['ema'] for indicator in indlist3: ## print indicator indarr = rpInd.GetEMA(DurBoth,sym,indicator) statename = sym+'.'+dur.replace(' ','')+'.' statefile = statearea +statename + indicator + '.state.csv' rpu_rp.WriteArrayToCsvfile(statefile, indarr)
now_dt = dt.datetime.strptime(now, spaceYtime_format) print 'cycle heartbeat...searching for sigs in last ',recentlimit recentsigs =[] for sym in symbol_list: #################################### for barsize in barlist : timeframe = bardict[barsize] durinseconds = secdict[barsize] barsizeNtimeframe = timeframe + barsize dur = barsize ## TicksUtile.assemble_dur_bars(today,sym,dur,durinseconds) DurBoth = rpu_rp.CsvToLines( DataDown+ today + '.'+sym+'.' + dur.replace(' ','') + '.both.csv') indlist = ['pivot', 'R'] for indicator in indlist: print sym indarr = rpInd.GetPivots(DurBoth,sym,indicator) statename = sym+'.'+dur.replace(' ','')+'.' statefile = statearea +statename + indicator + '.state.csv' rpu_rp.WriteArrayToCsvfile(statefile, indarr) indlist2 = ['kupper', 'klower', 'kmid'] for indicator in indlist2: ## print indicator indarr = rpInd.GetKupper(DurBoth,sym,indicator) statename = sym+'.'+dur.replace(' ','')+'.' statefile = statearea +statename + indicator + '.state.csv' rpu_rp.WriteArrayToCsvfile(statefile, indarr) ## keltner_channel_upper(highs,lows,closes,mult) indlist3 = ['ema'] for indicator in indlist3: ## print indicator indarr = rpInd.GetEMA(DurBoth,sym,indicator)