当前位置: 首页>>代码示例>>Python>>正文


Python TicksUtile.assemble_bars_1min_basis方法代码示例

本文整理汇总了Python中TicksUtile.assemble_bars_1min_basis方法的典型用法代码示例。如果您正苦于以下问题:Python TicksUtile.assemble_bars_1min_basis方法的具体用法?Python TicksUtile.assemble_bars_1min_basis怎么用?Python TicksUtile.assemble_bars_1min_basis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TicksUtile的用法示例。


在下文中一共展示了TicksUtile.assemble_bars_1min_basis方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_weeklies

# 需要导入模块: import TicksUtile [as 别名]
# 或者: from TicksUtile import assemble_bars_1min_basis [as 别名]
def create_weeklies():
    sym = 'SPX'
    basisdur = '1day'
    TicksUtile.assemble_dur_bars(date,sym,'1day','initialize','5secs')
    TicksUtile.assemble_bars_1min_basis(date,sym,'1Week','bartobar',basisdur)
    indlist = ['mcross','pivot','R','R2','S','S2']
    threshold = 0.0
    rpInd.create_states_files(sym,'1Week',date,threshold,indlist)
    rpInd.create_states_files(sym,'1day',date,threshold,indlist)
开发者ID:reprior123,项目名称:TraderSoftwareRP,代码行数:11,代码来源:CreateBarDbase.py

示例2: fibbo_50retrace

# 需要导入模块: import TicksUtile [as 别名]
# 或者: from TicksUtile import assemble_bars_1min_basis [as 别名]
symbol_list = symdict.keys()
##symbol_list =['ES','EUR.USD']
barlistall = bardict.keys()  ##
barlist =[]
barlist = ['1 Week']
##########################################
date =  rpu_rp.todaysdateunix()
date = '20150905'
datehyphen = rpu_rp.todaysdatehypens(date)
##########################
import RP_Snapshot
sym = 'SPX'
##RP_Snapshot.snapshot_sym(sym,date)
basisdur = '1day'
TicksUtile.assemble_dur_bars(date,sym,'1day','initialize','5secs')
TicksUtile.assemble_bars_1min_basis(date,sym,'1Week','bartobar',basisdur)
indlist = ['mcross','pivot','R','R2','S','S2']
threshold = 0.0
rpInd.create_states_files(sym,'1Week',date,threshold,indlist)
rpInd.create_states_files(sym,'1day',date,threshold,indlist)

'''
def fibbo_50retrace(low,high,sym,perc) :  # could also use a time range for a range of bars / add this to states per duration
    retraceval = (high-low)/(100/perc)
    return retraceval

def check_lines(linesfile,curprice,tolerance):
    for l in linesfile:
        diff = curprice - l[0]
        if diff < tolerance:
            lines.append(l[0])
开发者ID:reprior123,项目名称:TraderSoftwareRP,代码行数:33,代码来源:RP_getWeeklies.py


注:本文中的TicksUtile.assemble_bars_1min_basis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。