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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 【提问】为什么在提前下单的判断条件中要加入 not(islastbar)

   

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


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

主题:【提问】为什么在提前下单的判断条件中要加入 not(islastbar)

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


加好友 发短信
等级:论坛游民 帖子:308 积分:0 威望:0 精华:0 注册:2014/2/10 23:56:25
【提问】为什么在提前下单的判断条件中要加入 not(islastbar)  发帖心情 Post By:2014/9/29 12:50:43    Post IP:134.191.220.73[只看该作者]

老师,您好

如下代码是论坛上提前下单的代码,我有3个问题:


ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);

if abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end


(1)这段代码适用于后台程序么?

(2)为什么在abb中要加入not(islastbar)?这样就算不是最后一根K线也会开仓下单吗?

(3)假设tq=5,那么time0-timetot0(dynainfo(207))<=tq 这句话不是会分别在 55s 56s 57s 58s 59s都将abb设成true,从而导致55~59秒都去下单吗?


 回到顶部