欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]代码出啥问题了?

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有5987人关注过本帖平板打印复制链接

主题:[求助]代码出啥问题了?

帅哥哟,离线,有人找我吗?
z7c9
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[求助]代码出啥问题了?  发帖心情 Post By:2010/9/20 11:45:39    Post IP:123.118.81.198[只看该作者]

 

input:n(30,1,120,10),m(30,1,60,10);

le:=bidprice>=ref(bidprice,1) and bidvol/askvol>=n and askprice=close;
lx1:=enterbars<m and enterprice-bidprice>=2*mindiff and bidprice=close;
lx2:=enterbars<m and bidprice-enterprice>=3*mindiff and bidprice=close;
lx3:=enterbars>=m and abs(enterprice-bidprice)>=1*mindiff and bidprice=close;


se:=askprice<=ref(askprice,1) and askvol/bidvol>=n and bidprice=close;
sx1:=enterbars<m and askprice-enterprice>=2*mindiff and askprice=close;
sx2:=enterbars<m and enterprice-askprice>=3*mindiff and askprice=close;
sx3:=enterbars>=m and abs(askprice-enterprice)>=1*mindiff and askprice=close;


if holding=0 then
 buy(le,1,limitr,askprice);
if holding>0 then
 sell(lx1 or lx2 or lx3,holding,limitr,bidprice);
if holding=0 then
 buyshort(se,1,limitr,bidprice);
if holding<0 then
 sellshort(sx1 or sx2 or sx3,holding,limitr,askprice);

资产:asset,noaxis;
胜率:percentwin,linethick0;
次数:totaltrade,linethick0;

 

 

 

[此贴子已经被作者于2010-9-20 11:48:18编辑过]

 回到顶部