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


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

   

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


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

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

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


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

 runmode:0;
input:volatility(20,5,100,5);
 variable:myasset=30000;
entertime:=time>=092500 and time<=145500;   //这一句为什么编译有错误???
 exittime:=time>=150000;
 
dist:=barslast(date<>ref(date,1));
oo:=ref(open,dist);
 
 highest:=oo+volatility*mindiff;
 lowest:=oo-volatility*mindiff;

 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;
 出击:totaltrade/(count(date<>ref(date,1),0)+1),linethick0;
 连亏:maxseqloss,linethick0;
 连赢:maxseqwin,linethick0;


 回到顶部