TYP := (HIGH + LOW + CLOSE)/3; (TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M));
请问如何编写,当CCI指标线 大于0轴线时平空开多,小于时平多开空?
2楼
pyd 发表于:2015/3/5 13:33:19
TYP : (HIGH + LOW + CLOSE)/3; cci:(TYP-MA(TYP,m))/(0.015*AVEDEV(TYP,m)),NOAXIS; if cci>0 then begin sellshort(holding<0,holding,market); buy(holding=0,1,market); end if cci<0 then begin sell(holding>0,holding,market); buyshort(holding=0,1,market); end