等级: 机构版
- 注册:
- 2022-2-14
- 曾用名:
|
搞了10多年量化,编程能力不用怀疑,先送各位朋友一个实盘套利的模型,改下账户就可以直接实盘(螺纹-热卷套利)。在最下方
再低价出售一个实盘的螺纹5分钟收盘价模型,也可实盘。
最后还有一套日胜率至少在70%以上的大多数品种都合适的策略,大小资金都可以承载,有意合作的,请提供模拟账户(我有机构版),跟踪一周感受下。
愿意合作的加微信(13771046448),5分钟螺纹模型,3年1W做1手,测试结果
名称 利润率 年回报 胜率 交易数 成功率 最大回撤% MAR比率
全部综合 532.21% 87.44% 39.94% 1242 0.00% 28.05% 3.12
螺纹钢连续 532.21% 87.44% 39.94% 1242 0.00% 28.05% 3.12
200元即可获取(我的诚意满满,一点钱是对自己创造模型的辛苦钱,套利的代码价值都不止这些。)
更好的策略只能通过合作方提供模拟账户感受。
globalvariable:top=0;
ac_m:='1111';//交易账户
pz1:='rb10';
pz2:='hc10';
bw:=1;
jc:=15;
hd:=5;
if tisremain(0)>0 then
begin
tcancelex(1,0,ac_m,pz1);
tcancelex(1,0,ac_m,pz2);
end
flag:=extgbdata('m_rbhc');
bac1:=tbuyholdingex(ac_m,pz1,1);
sac1:=tsellholdingex(ac_m,pz1,1);
bac2:=tbuyholdingex(ac_m,pz2,1);
sac2:=tsellholdingex(ac_m,pz2,1);
if flag=0 then
begin
if bac1>0 or sac2>0 then
begin
tsell(1,bac1,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tsellshort(1,sac2,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
end
if bac2=0 and sac1=0 then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if sac1>0 and bac2>0 and sac1=bac2 and tavgenterpriceex2(ac_m,pz2,0)>0 and tavgenterpriceex2(ac_m,pz1,1)>0 then
begin
dyk:=(dynainfo2(7,pz2)-tavgenterpriceex2(ac_m,pz2,0));
kyk:=(tavgenterpriceex2(ac_m,pz1,1)-dynainfo2(7,pz1));
jl:=intpart(dyk+kyk);
if jl<=(-jc) and sac1<2*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=(-2*jc) and sac1<3*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=(-3*jc) and sac1<4*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=(-4*jc) and sac1<5*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);;
exit;
end
if jl<=(-5*jc) and sac1<6*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=-6*jc and sac1<7*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=-7*jc and sac1<8*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=-8*jc and sac1<9*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=-9*jc and sac1<10*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if jl<=-10*jc and sac1<11*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
tbuy(1,bw,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
sleep(10000);
exit;
end
if sac1*jl>=2*(jc+sac1*2) then
begin
if jl>top then top:=jl;
if (top-jl)>=5 then
begin
tsellshort(1,sac1,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
tsell(1,bac2,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
top:=0;
extgbdataset('m_rbhc',1);
end
end
end
end
if flag=1 then
begin
if sac1>0 or bac2>0 then
begin
tsell(1,bac2,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tsellshort(1,sac1,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
end
if bac1=0 and sac2=0 then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if sac2>0 and bac1>0 and tavgenterpriceex2(ac_m,pz1,0)>0 and tavgenterpriceex2(ac_m,pz2,1)>0 then
begin
dyk:=(dynainfo2(7,pz1)-tavgenterpriceex2(ac_m,pz1,0));
kyk:=(tavgenterpriceex2(ac_m,pz2,1)-dynainfo2(7,pz2));
jl:=intpart(dyk+kyk);
if jl<=-jc and bac1<2*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-2*jc and bac1<3*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-3*jc and bac1<4*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-4*jc and bac1<5*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-5*jc and bac1<6*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-6*jc and bac1<7*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-7*jc and bac1<8*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-8*jc and bac1<9*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-9*jc and bac1<10*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if jl<=-10*jc and bac1<11*bw then
begin
tbuyshort(1,bw,lmt,dynainfo2(7,pz2)-hd,0,ac_m,pz2);
tbuy(1,bw,lmt,dynainfo2(7,pz1)+hd,0,ac_m,pz1);
sleep(10000);
exit;
end
if bac1*jl>=2*(jc+2*bac1) then
begin
if jl>top then top:=jl;
if (top-jl)>=5 then
begin
tsellshort(1,sac2,lmt,dynainfo2(7,pz2)+hd,0,ac_m,pz2);
tsell(1,bac1,lmt,dynainfo2(7,pz1)-hd,0,ac_m,pz1);
top:=0;
extgbdataset('m_rbhc',0);
end
end
end
end
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?
x
|