本文整理汇总了Python中TicksUtile.format_RTTicks_to_5secBars方法的典型用法代码示例。如果您正苦于以下问题:Python TicksUtile.format_RTTicks_to_5secBars方法的具体用法?Python TicksUtile.format_RTTicks_to_5secBars怎么用?Python TicksUtile.format_RTTicks_to_5secBars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TicksUtile
的用法示例。
在下文中一共展示了TicksUtile.format_RTTicks_to_5secBars方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sleep
# 需要导入模块: import TicksUtile [as 别名]
# 或者: from TicksUtile import format_RTTicks_to_5secBars [as 别名]
if command == 'QUIT-setting':
controlflag = False
print 'got the order to exit program....!!! <<<'
loopmax = 1
###############
loop +=1
sleep(cycledelay)
## print command,'com setting timedrift..pricedrift',now
recentsigs =[]
rpu_rp.WriteArrayToCsvfile(sigarea +today+'.sigs.csv', []) # flush the file to keep all sigs
for sym in symbol_list:
rpu_rp.WriteArrayToCsvfile(sigarea +sym+'.sigs.csv', []) # flush the file to keep all sigs
## merge the 5secddload with 5sec recents > 5sec boths
RTticksFile = DataDown +today+'.'+sym+ '.RTticks.csv'
RTBarsin = rpu_rp.CsvToLines(RTticksFile)
RTTickBarsReformatted = TicksUtile.format_RTTicks_to_5secBars(RTBarsin,sym)
RTBars5Sec = TicksUtile.create_bars_from_bars(RTTickBarsReformatted,today,sym,'5 secs',1) ##RTticks > RTbars[5secRecentBars]
## print '5sec bars done'
filetomerge = DataDown +today+'.'+sym+'.'+'5 secs'+'.ddload.csv' #. .. only really need to do this once..test for recent file?
TicksUtile.merge_bar_files(filetomerge) #this creates the both file
## print 'finish tick rewrite'
####################################
for barsize in barlist :#[barlist[0]]:
timeframe = bardict[barsize]
durinseconds = secdict[barsize]
barsizeNtimeframe = timeframe + barsize
decimalboost = dboostdict[sym]
dur = barsize
TicksUtile.create_bars_from_bars(RTBars5Sec,today,sym,dur,durinseconds) ## writes recent
## merge the dur ddload with dur recents > dur boths