以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://222.73.7.161/bbs/index.asp) -- 交易策略发布专区 (http://222.73.7.161/bbs/list.asp?boardid=10) ---- [交易系统]openbreaksystem (http://222.73.7.161/bbs/dispbbs.asp?boardid=10&id=8589) |
-- 作者:z7c9 -- 发布时间:2011/10/24 20:00:40 -- [交易系统]openbreaksystem
runmode:0;
input:entrystop(0.5); input:exitstop(0.5); input:malength(120); myma:=ma(open,malength); entrylongcond:=open>myma and high>=open*(1+entrystop/100); exitlongcond:=low<=open*(1-exitstop/100); entryshortcond:=open if holding=0 then begin if entrylongcond then buy(1,1,limitr,open*(1+entrystop/100)); if entryshortcond then buyshort(1,1,limitr,open*(1-entrystop/100)); end if holding>0 then begin if exitlongcond then sell(1,holding,limitr,open*(1-exitstop/100)); end if holding<0 then begin if exitshortcond then sellshort(1,holding,limitr,open*(1+exitstop/100)); end 盈亏:asset-500000,noaxis,coloryellow,linethick2; |