Ejemplo n.º 1
0
def xcalc(name, strategy, functor):
    ifmap = ifreader.read1(
        name, extractor=extract_if_wh
    )  # fname ==> BaseObject(name='$name',transaction=trans)
    sif = ifmap[name]
    tradesy = functor(sif, strategy)
    iftrade.last_actions(tradesy)
Ejemplo n.º 2
0
def wcalc(strategy,functor):
    fname = find_cur()
    name = get_if_name(fname)
    path = get_if_path(fname)
    #print path,wh_path
    ifmap = ifreader.readp(path,name,extractor=extract_if_wh)  # fname ==> BaseObject(name='$name',transaction=trans)
    sif = ifmap[name]
    tradesy =  functor(sif,strategy)    #xfollow作为平仓信号,且去掉了背离平仓的信号
    iftrade.last_actions(tradesy)
Ejemplo n.º 3
0
def wcalc(strategy, functor):
    fname = find_cur()
    name = get_if_name(fname)
    path = get_if_path(fname)
    #print path,wh_path
    ifmap = ifreader.readp(
        path, name, extractor=extract_if_wh
    )  # fname ==> BaseObject(name='$name',transaction=trans)
    sif = ifmap[name]
    tradesy = functor(sif, strategy)  #xfollow作为平仓信号,且去掉了背离平仓的信号
    iftrade.last_actions(tradesy)
Ejemplo n.º 4
0
def xcalc(name,strategy,functor):
    ifmap = ifreader.read1(name,extractor=extract_if_wh)  # fname ==> BaseObject(name='$name',transaction=trans)
    sif = ifmap[name]
    tradesy =  functor(sif,strategy)    
    iftrade.last_actions(tradesy)