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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 编写求助 tp

   

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


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

主题:编写求助 tp

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


加好友 发短信
等级:超级版主 帖子:21598 积分:0 威望:0 精华:1 注册:2010/7/31 16:35:30
  发帖心情 Post By:2020/10/30 10:49:16    Post IP:58.246.57.26[只看该作者]

bar1:barslast(time=0130);
h1:ref(hhv(high,30),bar1);
variable:num1=0;
//夜盘突破前高
if high>h1 and holding<=0 and time>0130 and time<0630 and num1<3 then
begin
 sellshort(1,holding,marketr);
 buy(1,1,marketr);
 num1:num1+1;
end

//止损3个点
if close<enterprice-3*mindiff then sell(1,holding,marketr);
//盈利大于20后止损放到开仓价
if hhv(close,enterbars) - enterprice>20*mindiff and close<enterprice then sell(1,holding,marketr);

//尾盘平仓
if time = 0630 then
begin
 sell(1,holding,marketr);
END


/////////////////////////////////////////////////////////////////////////
bar2:barslast(time=1330);
h2:ref(hhv(high,30),bar2);
variable:num2=0;
//早突破前高
if high>h2 and holding<=0 and time>1330 and time<1530 and num2<3 then
begin
 sellshort(1,holding,marketr);
 buy(1,1,marketr);
 num2:=num2+1;
end

//止损3个点
if close<enterprice-3*mindiff then sell(1,holding,marketr);
//盈利大于20后止损放到开仓价
if hhv(close,enterbars) - enterprice>20*mindiff and close<enterprice then sell(1,holding,marketr);

//尾盘平仓
if time = 1530 then
begin
 sell(1,holding,marketr);
END


 回到顶部