打印本文打印本文 关闭窗口关闭窗口

请教老师:如何限定每天只开、平一次

作者:金字塔 来源:cxh99.com 发布时间:2016年12月26日
  • 咨询内容: 请教老师:如何限定每天只开、平一次,在策略里加 TOTALDAYTRADE<=1语句好像不起作用。

     

  • 金字塔客服:

    这个要用全局变量的

    variable:bj=0;

     

    if 开多条件 and holding=0 and bj=0 then begin

         buy(1,1,marketr);

         bj:=1;

    end

     

    if holding>0 and  bj=1 and 平多条件 then begin

          sell(1,0,marketr);

    end

     

     

    if time=closetime(0) then bj:=0;

     

  • 用户回复: 这么复杂
打印本文打印本文 关闭窗口关闭窗口