Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

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

1楼
z7c9 发表于:2011/1/1 15:35:03

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楼
董小球 发表于:2011/1/4 15:36:52

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

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01953 s, 3 queries.