예제 #1
0
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)
예제 #2
0
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])
예제 #3
0
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])
            pass