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


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

   

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


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

主题:[交易系统]通道突破

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


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

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

 

以下内容为程序代码:

1 runmode:0;
2
3 {
4 策略名称:PCB
5 交易品种:糖
6 交易周期:5分钟
7 入市策略:通道突破
8 风险控制:收盘平仓
9 资金管理:1手
10 }
11
12 input:period(20,5,100,5);
13
14 variable:myasset=30000;
15
16 entertime:=time>=092500 and time<=145500;
17 exittime:=time>=150000;
18
19 highest:=ref(hhv(high,period),1);
20 lowest:=ref(llv(low,period),1);
21
22 buycond:=entertime and high>=highest;
23 buyprice:=max(open,highest);
24
25 buyshortcond:=entertime and low<=lowest;
26 buyshortprice:=min(open,lowest);
27
28 if holding=0 and buycond then begin
29 buy(1,1,limitr,buyprice);
30 end
31
32 if holding=0 and buyshortcond then begin
33 buyshort(1,1,limitr,buyshortprice);
34 end
35
36 if holding>0 and exittime then begin
37 sell(1,holding,limitr,close);
38 end
39
40 if holding<0 and exittime then begin
41 sellshort(1,holding,limitr,close);
42 end
43
44 if exittime then
45 myasset:=asset;
46
47 资产:myasset,noaxis,colormagenta;
48 次数:totaltrade,linethick0;
49 收益:(myasset-30000)/30000,linethick0;
50 胜率:percentwin,linethick0;
51 连亏:maxseqloss,linethick0;
52 连赢:maxseqwin,linethick0;
53

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

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


加好友 发短信
等级:新手上路 帖子:15 积分:90 威望:0 精华:0 注册:2010/11/4 17:53:02
  发帖心情 Post By:2011/2/12 20:56:29 [只看该作者]

 runmode:0;

{ 策略名称:PCB
 交易品种:糖
交易周期:5分钟
 入市策略:通道突破
 风险控制:收盘平仓
 资金管理:1手  }

 input:period(20,5,100,5);

 variable:myasset=30000;
 
 entertime:=time>=092500 and time<=145500;
 exittime:=time>=150000;
 
 highest:=ref(hhv(high,period),1);
 lowest:=ref(llv(low,period),1);
 
 buycond:=entertime and high>=highest;
 buyprice:=max(open,highest);
 
 buyshortcond:=entertime and low<=lowest;
 buyshortprice:=min(open,lowest);
 
 if holding=0 and buycond then begin
 buy(1,1,limitr,buyprice);
 end
 
 if holding=0 and buyshortcond then begin
 buyshort(1,1,limitr,buyshortprice);
 end
 
 if holding>0 and exittime then begin
 sell(1,holding,limitr,close);
 end
 
 if holding<0 and exittime then begin
 sellshort(1,holding,limitr,close);
 end
 
 if exittime then
 myasset:=asset;
 
 资产:myasset,noaxis,colormagenta;
 次数:totaltrade,linethick0;
 收益:(myasset-30000)/30000,linethick0;
 胜率:percentwin,linethick0;
 连亏:maxseqloss,linethick0;
 连赢:maxseqwin,linethick0;


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


加好友 发短信
等级:新手上路 帖子:40 积分:154 威望:0 精华:0 注册:2013/1/29 21:12:59
  发帖心情 Post By:2013/1/29 21:15:40 [只看该作者]

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

 回到顶部