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


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

   

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


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

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

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


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

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

 

runmode:0;

input:length(20,1,100,1);
input:numatrs(1);

entertime:=time>=093500 and time<=145500;
exittime:=time>=150000;

tprice:=(high+low+close)/3;
avgvalue:=ma(tprice,length);
shiftvalue:=numatrs*ma(tr,length);
upperband:=avgvalue+shiftvalue;
lowerband:=avgvalue-shiftvalue;

longcond:=entertime and high>=trimprice(ref(upperband,1));
longprice:=max(trimprice(ref(upperband,1)),open);

shortcond:=entertime and low<=trimprice(ref(lowerband,1));
shortprice:=min(trimprice(ref(lowerband,1)),open);

if holding=0 then begin
 if longcond then
  buy(1,1,limitr,longprice);
end

if holding=0 then begin
 if shortcond then
  buyshort(1,1,limitr,shortprice);
end

if holding>0 then begin
 if exittime then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if exittime then
  sellshort(1,holding,limitr,close);
end
     
收益:(asset-500000)/500000,noaxis,colormagenta;
次数:totaltrade,linethick0;
胜率:percentwin,linethick0;
连亏:maxseqloss,linethick0;
连赢:maxseqwin,linethick0;

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

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


加好友 发短信 原leevolvo
等级:版主 帖子:2160 积分:10563 威望:0 精华:11 注册:2010/11/3 11:21:19
  发帖心情 Post By:2011/2/25 16:12:41 [只看该作者]

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

牛,怎么不加个止损进去


 回到顶部