Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共1 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:简单模型分享

1楼
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;

共1 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 5.93359 s, 2 queries.