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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]合约信息公式

   

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


  共有5007人关注过本帖树形打印复制链接

主题:[原创]合约信息公式

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


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[原创]合约信息公式  发帖心情 Post By:2011/1/1 15:35:03    Post IP:114.243.126.219[只看该作者]

ContractInfo:

 

以下内容为程序代码:

1 runmode:1;
2
3 if stricmp(marketlabel,'sq')=0 then
4     label:=strleft(stklabel,2);
5         
6 if stricmp(marketlabel,'dq')=0 then
7     label:=strleft(stklabel,1);
8
9 if stricmp(marketlabel,'zq')=0 then
10     label:=strleft(stklabel,2);    
11     
12 if stricmp(marketlabel,'zj')=0 then
13     label:=strleft(stklabel,2);
14     
15 minmove:mindiff,linethick0;
16
17 bigpoint:multiplier,linethick0;
18
19 commission:if(stricmp(label,'cu')=0,0.03,
20 if(stricmp(label,'al')=0,6,
21 if(stricmp(label,'zn')=0,12,
22 if(stricmp(label,'ru')=0,0.025,
23 if(stricmp(label,'au')=0,45,
24 if(stricmp(label,'fu')=0,3,
25 if(stricmp(label,'rb')=0,0.015,
26 if(stricmp(label,'wr')=0,0.015,
27 if(stricmp(label,'a')=0,6,
28 if(stricmp(label,'b')=0,6,
29 if(stricmp(label,'c')=0,3,
30 if(stricmp(label,'m')=0,5,
31 if(stricmp(label,'y')=0,8,
32 if(stricmp(label,'l')=0,12,
33 if(stricmp(label,'p')=0,6,
34 if(stricmp(label,'v')=0,12,
35 if(stricmp(label,'wt')=0,3,
36 if(stricmp(label,'ws')=0,3,
37 if(stricmp(label,'er')=0,3,
38 if(stricmp(label,'cf')=0,12,
39 if(stricmp(label,'sr')=0,6,
40 if(stricmp(label,'ta')=0,8,    
41 if(stricmp(label,'ro')=0,6,    
42 if(stricmp(label,'if')=0,0.008,0)))))))))))))))))))))))),linethick0;    
43     
44 marginratio:if(stricmp(label,'cu')=0,0.16,
45 if(stricmp(label,'al')=0,0.14,
46 if(stricmp(label,'zn')=0,0.17,
47 if(stricmp(label,'ru')=0,0.18,
48 if(stricmp(label,'au')=0,0.14,
49 if(stricmp(label,'fu')=0,0.16,
50 if(stricmp(label,'rb')=0,0.16,
51 if(stricmp(label,'wr')=0,0.15,
52 if(stricmp(label,'a')=0,0.15,
53 if(stricmp(label,'b')=0,0.15,
54 if(stricmp(label,'c')=0,0.14,
55 if(stricmp(label,'m')=0,0.15,
56 if(stricmp(label,'y')=0,0.15,
57 if(stricmp(label,'l')=0,0.16,
58 if(stricmp(label,'p')=0,0.16,
59 if(stricmp(label,'v')=0,0.16,
60 if(stricmp(label,'wt')=0,0.15,
61 if(stricmp(label,'ws')=0,0.14,
62 if(stricmp(label,'er')=0,0.16,
63 if(stricmp(label,'cf')=0,0.17,
64 if(stricmp(label,'sr')=0,0.17,
65 if(stricmp(label,'ta')=0,0.16,    
66 if(stricmp(label,'ro')=0,0.16,    
67 if(stricmp(label,'if')=0,0.2,0)))))))))))))))))))))))),linethick0;
68
69 margin:rounds(close*multiplier*marginratio,2),linethick0;
70
71 slippage:0,linethick0;


 回到顶部
帅哥哟,离线,有人找我吗?
董小球
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 大哥
等级:超级版主 帖子:2837 积分:13237 威望:0 精华:2 注册:2010/7/14 17:31:54
  发帖心情 Post By:2011/1/4 15:36:52    Post IP:58.246.57.26[只看该作者]

哇 要是有代码作用说明就好了



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部