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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]不同品种的策略参数写入自定义数据

   

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


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

主题:[原创]不同品种的策略参数写入自定义数据

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


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[原创]不同品种的策略参数写入自定义数据  发帖心情 Post By:2010/12/31 10:55:08    Post IP:114.243.114.138[只看该作者]

阅读版:

 

以下内容为程序代码:

1 if stricmp(marketlabel,'sq')=0 then
2     label:=strleft(stklabel,2);
3         
4 if stricmp(marketlabel,'dq')=0 then
5     label:=strleft(stklabel,1);
6
7 if stricmp(marketlabel,'zq')=0 then
8     label:=strleft(stklabel,2);    
9     
10 if stricmp(marketlabel,'zj')=0 then
11     label:=strleft(stklabel,2);
12
13 cbs_period:if(stricmp(label,'cu')=0,60,
14 if(stricmp(label,'al')=0,60,
15 if(stricmp(label,'zn')=0,60,
16 if(stricmp(label,'ru')=0,60,
17 if(stricmp(label,'au')=0,60,
18 if(stricmp(label,'fu')=0,60,
19 if(stricmp(label,'rb')=0,60,
20 if(stricmp(label,'wr')=0,60,
21 if(stricmp(label,'a')=0,60,
22 if(stricmp(label,'b')=0,60,
23 if(stricmp(label,'c')=0,60,
24 if(stricmp(label,'m')=0,60,
25 if(stricmp(label,'y')=0,100,
26 if(stricmp(label,'l')=0,60,
27 if(stricmp(label,'p')=0,60,
28 if(stricmp(label,'v')=0,60,
29 if(stricmp(label,'wt')=0,60,
30 if(stricmp(label,'ws')=0,60,
31 if(stricmp(label,'er')=0,60,
32 if(stricmp(label,'cf')=0,60,
33 if(stricmp(label,'sr')=0,60,
34 if(stricmp(label,'ta')=0,60,
35 if(stricmp(label,'ro')=0,60,
36 if(stricmp(label,'if')=0,60,0)))))))))))))))))))))))),linethick0;
37
38 cbs_initialstop:if(stricmp(label,'cu')=0,20,
39 if(stricmp(label,'al')=0,20,
40 if(stricmp(label,'zn')=0,20,
41 if(stricmp(label,'ru')=0,20,
42 if(stricmp(label,'au')=0,20,
43 if(stricmp(label,'fu')=0,20,
44 if(stricmp(label,'rb')=0,20,
45 if(stricmp(label,'wr')=0,20,
46 if(stricmp(label,'a')=0,20,
47 if(stricmp(label,'b')=0,20,
48 if(stricmp(label,'c')=0,20,
49 if(stricmp(label,'m')=0,20,
50 if(stricmp(label,'y')=0,15,
51 if(stricmp(label,'l')=0,20,
52 if(stricmp(label,'p')=0,20,
53 if(stricmp(label,'v')=0,20,
54 if(stricmp(label,'wt')=0,20,
55 if(stricmp(label,'ws')=0,20,
56 if(stricmp(label,'er')=0,20,
57 if(stricmp(label,'cf')=0,20,
58 if(stricmp(label,'sr')=0,20,
59 if(stricmp(label,'ta')=0,20,
60 if(stricmp(label,'ro')=0,20,
61 if(stricmp(label,'if')=0,20,0)))))))))))))))))))))))),linethick0;
62
63 cbs_trailingstop:if(stricmp(label,'cu')=0,40,
64 if(stricmp(label,'al')=0,40,
65 if(stricmp(label,'zn')=0,40,
66 if(stricmp(label,'ru')=0,40,
67 if(stricmp(label,'au')=0,40,
68 if(stricmp(label,'fu')=0,40,
69 if(stricmp(label,'rb')=0,40,
70 if(stricmp(label,'wr')=0,40,
71 if(stricmp(label,'a')=0,40,
72 if(stricmp(label,'b')=0,40,
73 if(stricmp(label,'c')=0,40,
74 if(stricmp(label,'m')=0,40,
75 if(stricmp(label,'y')=0,50,
76 if(stricmp(label,'l')=0,40,
77 if(stricmp(label,'p')=0,40,
78 if(stricmp(label,'v')=0,40,
79 if(stricmp(label,'wt')=0,40,
80 if(stricmp(label,'ws')=0,40,
81 if(stricmp(label,'er')=0,40,
82 if(stricmp(label,'cf')=0,40,
83 if(stricmp(label,'sr')=0,40,
84 if(stricmp(label,'ta')=0,40,
85 if(stricmp(label,'ro')=0,40,
86 if(stricmp(label,'if')=0,40,0)))))))))))))))))))))))),linethick0;
87
88 cbs_stopratio:if(stricmp(label,'cu')=0,0,
89 if(stricmp(label,'al')=0,0,
90 if(stricmp(label,'zn')=0,0,
91 if(stricmp(label,'ru')=0,0,
92 if(stricmp(label,'au')=0,0,
93 if(stricmp(label,'fu')=0,0,
94 if(stricmp(label,'rb')=0,0,
95 if(stricmp(label,'wr')=0,0,
96 if(stricmp(label,'a')=0,0,
97 if(stricmp(label,'b')=0,0,
98 if(stricmp(label,'c')=0,0,
99 if(stricmp(label,'m')=0,0,
100 if(stricmp(label,'y')=0,0,
101 if(stricmp(label,'l')=0,0,
102 if(stricmp(label,'p')=0,0,
103 if(stricmp(label,'v')=0,0,
104 if(stricmp(label,'wt')=0,0,
105 if(stricmp(label,'ws')=0,0,
106 if(stricmp(label,'er')=0,0,
107 if(stricmp(label,'cf')=0,0,
108 if(stricmp(label,'sr')=0,0,
109 if(stricmp(label,'ta')=0,0,
110 if(stricmp(label,'ro')=0,0,
111 if(stricmp(label,'if')=0,0,0)))))))))))))))))))))))),linethick0;

 

拷贝版:

if stricmp(marketlabel,'sq')=0 then
label:=strleft(stklabel,2);

if stricmp(marketlabel,'dq')=0 then
label:=strleft(stklabel,1);

if stricmp(marketlabel,'zq')=0 then
label:=strleft(stklabel,2);

if stricmp(marketlabel,'zj')=0 then
label:=strleft(stklabel,2);

cbs_period:if(stricmp(label,'cu')=0,60,
if(stricmp(label,'al')=0,60,
if(stricmp(label,'zn')=0,60,
if(stricmp(label,'ru')=0,60,
if(stricmp(label,'au')=0,60,
if(stricmp(label,'fu')=0,60,
if(stricmp(label,'rb')=0,60,
if(stricmp(label,'wr')=0,60,
if(stricmp(label,'a')=0,60,
if(stricmp(label,'b')=0,60,
if(stricmp(label,'c')=0,60,
if(stricmp(label,'m')=0,60,
if(stricmp(label,'y')=0,100,
if(stricmp(label,'l')=0,60,
if(stricmp(label,'p')=0,60,
if(stricmp(label,'v')=0,60,
if(stricmp(label,'wt')=0,60,
if(stricmp(label,'ws')=0,60,
if(stricmp(label,'er')=0,60,
if(stricmp(label,'cf')=0,60,
if(stricmp(label,'sr')=0,60,
if(stricmp(label,'ta')=0,60,
if(stricmp(label,'ro')=0,60,
if(stricmp(label,'if')=0,60,0)))))))))))))))))))))))),linethick0;

cbs_initialstop:if(stricmp(label,'cu')=0,20,
if(stricmp(label,'al')=0,20,
if(stricmp(label,'zn')=0,20,
if(stricmp(label,'ru')=0,20,
if(stricmp(label,'au')=0,20,
if(stricmp(label,'fu')=0,20,
if(stricmp(label,'rb')=0,20,
if(stricmp(label,'wr')=0,20,
if(stricmp(label,'a')=0,20,
if(stricmp(label,'b')=0,20,
if(stricmp(label,'c')=0,20,
if(stricmp(label,'m')=0,20,
if(stricmp(label,'y')=0,15,
if(stricmp(label,'l')=0,20,
if(stricmp(label,'p')=0,20,
if(stricmp(label,'v')=0,20,
if(stricmp(label,'wt')=0,20,
if(stricmp(label,'ws')=0,20,
if(stricmp(label,'er')=0,20,
if(stricmp(label,'cf')=0,20,
if(stricmp(label,'sr')=0,20,
if(stricmp(label,'ta')=0,20,
if(stricmp(label,'ro')=0,20,
if(stricmp(label,'if')=0,20,0)))))))))))))))))))))))),linethick0;

cbs_trailingstop:if(stricmp(label,'cu')=0,40,
if(stricmp(label,'al')=0,40,
if(stricmp(label,'zn')=0,40,
if(stricmp(label,'ru')=0,40,
if(stricmp(label,'au')=0,40,
if(stricmp(label,'fu')=0,40,
if(stricmp(label,'rb')=0,40,
if(stricmp(label,'wr')=0,40,
if(stricmp(label,'a')=0,40,
if(stricmp(label,'b')=0,40,
if(stricmp(label,'c')=0,40,
if(stricmp(label,'m')=0,40,
if(stricmp(label,'y')=0,50,
if(stricmp(label,'l')=0,40,
if(stricmp(label,'p')=0,40,
if(stricmp(label,'v')=0,40,
if(stricmp(label,'wt')=0,40,
if(stricmp(label,'ws')=0,40,
if(stricmp(label,'er')=0,40,
if(stricmp(label,'cf')=0,40,
if(stricmp(label,'sr')=0,40,
if(stricmp(label,'ta')=0,40,
if(stricmp(label,'ro')=0,40,
if(stricmp(label,'if')=0,40,0)))))))))))))))))))))))),linethick0;

cbs_stopratio:if(stricmp(label,'cu')=0,0,
if(stricmp(label,'al')=0,0,
if(stricmp(label,'zn')=0,0,
if(stricmp(label,'ru')=0,0,
if(stricmp(label,'au')=0,0,
if(stricmp(label,'fu')=0,0,
if(stricmp(label,'rb')=0,0,
if(stricmp(label,'wr')=0,0,
if(stricmp(label,'a')=0,0,
if(stricmp(label,'b')=0,0,
if(stricmp(label,'c')=0,0,
if(stricmp(label,'m')=0,0,
if(stricmp(label,'y')=0,0,
if(stricmp(label,'l')=0,0,
if(stricmp(label,'p')=0,0,
if(stricmp(label,'v')=0,0,
if(stricmp(label,'wt')=0,0,
if(stricmp(label,'ws')=0,0,
if(stricmp(label,'er')=0,0,
if(stricmp(label,'cf')=0,0,
if(stricmp(label,'sr')=0,0,
if(stricmp(label,'ta')=0,0,
if(stricmp(label,'ro')=0,0,
if(stricmp(label,'if')=0,0,0)))))))))))))))))))))))),linethick0;


版主评定:好评,获得1个金币奖励好评,获得1个金币奖励
(理由:好文章)
 回到顶部
帅哥哟,离线,有人找我吗?
z7c9
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
  发帖心情 Post By:2010/12/31 10:56:20    Post IP:114.243.114.138[只看该作者]

以下内容为程序代码:

1 period:=selfdata('cbs_period');
2 initialstop:=selfdata('cbs_initialstop');
3 trailingstop:=selfdata('cbs_trailingstop');
4 stopratio:=selfdata('cbs_stopratio');

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


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2010/12/31 16:02:26    Post IP:58.246.57.26[只看该作者]

selfdata 是不能写自定义数据的只能读,如果是希望策略使用动态参数写入和保存,可以参考EXTGBDATA(S)EXTGBDATASET(S,X) 函数

 回到顶部