金字塔R-Breaker交易系统源码[金字塔模型]
-
相关简介:金字塔公式 金字塔模型策略源码:runmode:0; input:notbef(090000); input:notaft(145500); input:f1(0.35); input:f2(0.07); input:f3(0.25); input:myreverse(1); input:rangemin(0.2); input:xdiv(3); variable:ssetup=0; variable:bsetup=0; variable:senter=0; variable:benter=0;
-
文章来源:公式网 发布时间:2015-10-25浏览次数:
金字塔公式 金字塔模型策略源码:runmode:0;
input:notbef(090000);
input:notaft(145500);
input:f1(0.35);
input:f2(0.07);
input:f3(0.25);
input:myreverse(1);
input:rangemin(0.2);
input:xdiv(3);
variable:ssetup=0;
variable:bsetup=0;
variable:senter=0;
variable:benter=0;
variable:bbreak=0;
variable:sbreak=0;
variable:ltoday=0;
variable:hitoday=999999;
variable:startnow=0;
variable:div=0;
variable:rfilter=false;
i_reverse:=myreverse*(callstock(stklabel,vtopen,6,0)/100);
i_rangemin:=rangemin*(callstock(stklabel,vtopen,6,0)/100);
if barpos=1 then begin
startnow:=0;
div:=max(xdiv,1);
end
hh:=ref(hitoday,1);
cc:=ref(close,1);
ll:=ref(ltoday,1);
if date>ref(date,1) then begin
startnow:=startnow+1;
ssetup:=hh+f1*(cc-ll);
senter:=((1+f2)/2)*(hh+cc)-f2*ll;
benter:=((1+f2)/2)*(ll+cc)-f2*hh;
bsetup:=ll-f1*(hh-cc);
bbreak:=ssetup+f3*(ssetup-bsetup);
sbreak:=bsetup-f3*(ssetup-bsetup);
hitoday:=high;
ltoday:=low;
rfilter:=hh-cc>=rangemin;
end
if high>hitoday then hitoday:=high; if time>=notbef and time
if low
if hitoday>=ssetup and holding>=0 then begin
if low<=senter+(hitoday-ssetup)/div then begin
sell(1,holding,limitr,senter+(hitoday-ssetup)/div);
sellshort(1,1,limitr,senter+(hitoday-ssetup)/div);
end
end
if ltoday<=bsetup and holding<=0 then begin
if high>=benter-(bsetup-ltoday)/div then begin
sellshort(1,holding,limitr,benter-(bsetup-ltoday)/div);
buy(1,1,limitr,benter-(bsetup-ltoday)/div);
end
end
if holding<0 t


现在就去充值积分
加入VIP可下载100以下的所有资源