def createlines(fname): print inputfile rpInd.prepare_tick_files(inputfile,'tempbars.csv') lines = rpu_rp.CsvToLines('tempbars.csv') return lines
def createlines(fname): recentfile = fname.replace('.csv','.recent.csv') rpInd.prepare_tick_files(fname,fname.replace('.csv','both.csv'),recentfile) lines = rpu_rp.CsvToLines(fname.replace('.csv','both.csv')) return lines
print files ## 'ibdata.15mins.2D.*514.ES.csv') ### the recent trick will not work with multiple files ############################################# ### need to add swingpoint finder on hi los from 5 second bars###### ############################################## for inputfile in files: print inputfile ticklines = rpu_rp.CsvToLines('20150526.ticksnaps.csv') ## for l in ticklines: ## print l newbars = rpInd.create_bars_from_snapshots(ticklines, 5000, 300, 'fullbar') for b in newbars: print b rpu_rp.WriteArrayToCsvfile('20150526.ES.recent4 D5 mins.csv', newbars) rpInd.prepare_tick_files(inputfile, 'tempbars.csv') lines = rpu_rp.CsvToLines('tempbars.csv') ####################### if 'ES' in str(inputfile): decimalboost = 1 elif 'USD' in str(inputfile): decimalboost = 100 else: decimalboost = 1000 ################ bs = rpInd.strip1value(lines, 5) ##raw close price bsshort = bs[0:100] bshighs = rpInd.strip1value(lines, 3) bslows = rpInd.strip1value(lines, 4) timestamparray = rpInd.strip1value(lines, 1) ########################
def createlines(fname): recentfile = fname.replace('.csv','.recent.csv') rpInd.prepare_tick_files(inputfile,'tempbars.csv',recentfile) lines = rpu_rp.CsvToLines('tempbars.csv') return lines
def createlines(fname): print inputfile rpInd.prepare_tick_files(inputfile, 'tempbars.csv') lines = rpu_rp.CsvToLines('tempbars.csv') return lines
print files ## 'ibdata.15mins.2D.*514.ES.csv') ### the recent trick will not work with multiple files ############################################# ### need to add swingpoint finder on hi los from 5 second bars###### ############################################## for inputfile in files: print inputfile ticklines = rpu_rp.CsvToLines('20150526.ticksnaps.csv') ## for l in ticklines: ## print l newbars = rpInd.create_bars_from_snapshots(ticklines,5000,300,'fullbar') for b in newbars: print b rpu_rp.WriteArrayToCsvfile('20150526.ES.recent4 D5 mins.csv',newbars) rpInd.prepare_tick_files(inputfile,'tempbars.csv') lines = rpu_rp.CsvToLines('tempbars.csv') ####################### if 'ES' in str(inputfile): decimalboost = 1 elif 'USD' in str(inputfile): decimalboost= 100 else: decimalboost = 1000 ################ bs = rpInd.strip1value(lines,5) ##raw close price bsshort = bs[0:100] bshighs = rpInd.strip1value(lines,3) bslows = rpInd.strip1value(lines,4) timestamparray = rpInd.strip1value(lines,1) ########################