以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 程序化交易实盘俱乐部 (http://weistock.com/bbs/list.asp?boardid=9) ---- 简单模型分享 (http://weistock.com/bbs/dispbbs.asp?boardid=9&id=169664) |
-- 作者:Damoclus -- 发布时间:2019/4/30 20:38:20 -- 简单模型分享 //2019/4/14 //design variable:a1:=0; variable:aa1:=0; variable:a2:=1; variable:aa2=1; //************************ hh:=hhv(h,todaybar); ll:=llv(l,todaybar); rhh:=ref(hh,1); rll:=ref(ll,1); //************************ if l>rhh then begin sellshort(1,0,thisclose); buy(holding=0,1,thisclose); end if h<rll then begin sell(1,0,thisclose); buyshort(holding=0,1,thisclose); end //************************ if time>=144500 then begin sellshort(holding<0,0,thisclose); sell(holding>0,0,thisclose); end //数据 盈亏:asset-1000000,colorred,linethick1,noaxis; 交易总数:totaltrade,colorwhite,linethick0; 持仓:holding,colorwhite,linethick0; |