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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件交易策略发布专区 → [交易系统]波动突破

   

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


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

主题:[交易系统]波动突破

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


加好友 发短信
等级:小飞侠 帖子:1882 积分:3310 威望:0 精华:15 注册:2010/3/15 13:11:56
[交易系统]波动突破  发帖心情 Post By:2011/2/6 12:21:46 [只看该作者]

图片点击可在新窗口打开查看

 

以下内容为程序代码:

1 runmode:0;
2
3 input:volatility(20,5,100,5);
4
5 variable:myasset=30000;
6
7 entertime:=time>=092500 and time<=145500;
8 exittime:=time>=150000;
9
10 dist:=barslast(date<>ref(date,1));
11 oo:=ref(open,dist);
12
13 highest:=oo+volatility*mindiff;
14 lowest:=oo-volatility*mindiff;
15
16 buycond:=entertime and high>=highest;
17 buyprice:=max(open,highest);
18
19 buyshortcond:=entertime and low<=lowest;
20 buyshortprice:=min(open,lowest);
21
22 if holding=0 and buycond then begin
23     buy(1,1,limitr,buyprice);
24 end
25
26 if holding=0 and buyshortcond then begin
27     buyshort(1,1,limitr,buyshortprice);
28 end
29
30 if holding>0 and exittime then begin
31     sell(1,holding,limitr,close);
32 end
33
34 if holding<0 and exittime then begin
35     sellshort(1,holding,limitr,close);
36 end
37
38 if exittime then
39     myasset:=asset;
40     
41 资产:myasset,noaxis,colormagenta;
42 次数:totaltrade,linethick0;
43 收益:(myasset-30000)/30000,linethick0;
44 胜率:percentwin,linethick0;
45 出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
46 连亏:maxseqloss,linethick0;
47 连赢:maxseqwin,linethick0;
48

[此贴子已经被作者于2011-10-3 11:29:50编辑过]

 回到顶部