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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请人帮忙编写一个日内策略,谢谢!

   

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


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

主题:请人帮忙编写一个日内策略,谢谢!

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2012/5/3 13:32:19    Post IP:58.246.57.26[显示全部帖子]

我先想想思路,稍后给出


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2012/5/3 14:39:45    Post IP:58.246.57.26[显示全部帖子]

input:n(5,1,100,1);
variable:a=0,b=0;
variable:h1=0,l1=0;
ma60:=ma(c,60);

tt:=time>090000 and time<=145800;
c15:=callstock('sqru00',vtclose,3);
c60:=callstock('sqru00',vtclose,5);
if date<>ref(date,1) then begin
 h1:=h;
 l1:=l;
end
buycond:=c15>ma60 and c60>ma60;
sellcond:=c15<ma60 and c60<ma60;
if buycond and c>h1+n*mindiff and a=0 and tt then begin
 
 buy(holding=0,1,market);
 a:=a+1;
end
if sellcond and c<1-n*mindiff and b=0 and tt then begin
 
 buyshort(holding=0,1,market);
 b:=b+1;
end


if c<l1+n*mindiff then sell(holding>0 ,0,market);
if c>h1-n*mindiff then sellshort(holding<0,0,market);

if time>145800 and time<=150000 then begin
 sell(1,0,market);
 sellshort(1,0,market);
 a:=0;
 b:=0;
end

 



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部