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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → 求助阿火版主帮写个日内系统

   

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


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

主题:求助阿火版主帮写个日内系统

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


加好友 发短信 量化投资
等级:论坛游民 帖子:148 积分:653 威望:0 精华:0 注册:2010/9/27 16:08:27
  发帖心情 Post By:2011/11/7 9:55:54 [只看该作者]

不知道对否 ,可参考一下我写的


if not(time>=093500) then exit;

exittime:=time>=025800;

n:=barslast(date<>ref(date,1));

dayhigh:=ref(hhv(h,n),1);

daylow:=ref(llv(l,n),1);

h30:=ref(hhv(h,30),1);

l30:=ref(llv(l,30),1);

 

if time>093500 and h>=h30 then buy(holding=0,1,market);

if time>093500 and l<=l30 then buyshort(holding=0,1,market);

if holding>0 then begin

   if enterprice>dayhigh and close<=l30 or enterprice<daylow   then sell(1,holding,market);

   if enterprice<daylow  then buyshort(1,1,market);

end;

 

if holding<0 then begin

   if enterprice<daylow and close>=h30 or enterprice>dayhigh   then sellshort(1,holding,market);

   if enterprice<dayhigh  then buy(1,1,market);

end

 

if time>=145800 and time<=150000 then begin

 sellshort(holding<0,0,close);
 sell(holding>0,0,close);
 
end

 

[此贴子已经被作者于2011-11-7 10:05:32编辑过]

 回到顶部
总数 14 1 2 下一页