期货期权交流代码模拟交易 [MC]
-
咨询内容:
file:///C:/Users/24958/AppData/Roaming/Tencent/Users/2495814161/QQ/WinTemp/RichOle/Y$R~NPN88C6C%7BM%25NEY4ZBOG.png
你好,这是我的代码和测试中的截图,我设置了一个参数50200,按照代码的设置应该在上穿50140时买多单一手,但是系统没有发出委托,导致止损。这种情况并不是每次都发生,但是也不是只有这一次。你能帮我看看是什么原因吗?谢谢!6 小时前 上传 下载附件(259.94 KB)
inputs:p01(99999),p02(99999),p03(99999),p04(99999),p05(99999),p06(99999),p07(99999),p08(99999);
condition1=close cross above (p01-60) or close cross above (p02-60) or close cross above (p03-60) or close cross above (p04-60)
or close cross above (p05-60) or close cross above (p06-60) or close cross above (p07-60) or close cross above (p08-60);
condition2=close cross under (p01+60) or close cross under (p02+60) or close cross under (p03+60) or close cross under (p04+60)
or close cross under (p05+60) or close cross under (p06+60) or close cross under (p07+60) or close cross under (p08+60 );
condition3=close cross under (p01-60) or close cross under (p02-60) or close cross under (p03-60) or close cross under (p04-60)
or close cross under (p05-60) or close cross under (p06-60) or close cross under (p07-60) or close cross under (p08-60);
condition4=close cross above (p01+60) or close cross above (p02+60) or close cross above (p03+60) or close cross above (p04+60)
or close cross above (p05+60) or close cross above (p06+60) or close cross above (p07+60) or close cross above (p08+60);
if condition1 or condition4 then buy 1 contract next bar at close stop close+10 point limit;
if condition2 or condition3 then sellshort 1 contract next bar at close stop close-10 point limit;
SetProfitTarget(500);
setstopshare;setstoploss(250);
if time>=2359 then begin sell next bar at market;
end;
if time>=2359 then begin buytocover next bar at market;
end
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容