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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 老师好,帮忙编个程序

   

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


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

主题:老师好,帮忙编个程序

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


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

variable:hh=0;
variable:ll=100000;
n:=3;

h_1:=valuewhen(time=140000,hhv(h,todaybar));
l_1:=valuewhen(time=140000,llv(l,todaybar));

h_2:=valuewhen(time=010500,high);

l_2:=valuewhen(time=010500,low);

entertime1:=time>130000 and time<185000;

exittime1:=time>=185000 and time<=190000;

entertime2:=time>010000 and time<060000;

exittime2:=time>=060000 and time<=063000;

if h>h_1 and entertime1 then begin
 buy(holding=0,3,thisclose);
 hh:=h;
end

if h>hh then hh:=h;

if l<l_1 and entertime1 then begin
 buyshort(holding=0,3,thisclose);
 ll:=l;
end

if h>h_2 and entertime2 then begin
 buy(holding=0,3,thisclose);
 hh:=h;
end

if h>hh then hh:=h;

if l<l_2 and entertime2 then begin
 buyshort(holding=0,3,thisclose);
 ll:=l;
end

if l<ll then ll:=l;

if c-enterprice>33*mindiff then sell(holding>0,n/3,thisclose);

if enterprice-c>33*mindiff then sellshort(holding<0,n/3,thisclose);

if hh-h>10*mindiff and close-enterprice>10*mindiff then sell(holding>0,n*2/3,thisclose);

if l-ll>10*mindiff and enterprice-close>10*mindiff then sellshort(holding<0,n*2/3,thisclose);

if time=closetime(0) then begin
 sellshort(1,0,thisclose);
 sell(1,0,thisclose);
end



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

客户服务部

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

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

 回到顶部
总数 12 上一页 1 2