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

老师帮我看看

作者:金字塔 来源:cxh99.com 发布时间:2017年05月21日
  • 咨询内容: 老师好 我这样为什么不能实现每个信号下只开平仓一次呢 只要止盈或者止损后就会继续开平仓  麻烦老师帮忙给改正一下 谢谢   SS:=1;//ss
    if B8<=0 then begin,sellshort(1,holding,thisclose),orderqueue;
    buy(holding=0 and bj=0,ss,thisclose),orderqueue;
    end
    if bj=1 and B8<=0 and holding=0 and exitbars>1 then begin
    buy(1,ss,thisclose);
    bj:=0;
    endif B8>0 then beginsell(1,holding,thisclose),orderqueue;
    buyshort(holding=0 and bj=0,ss,thisclose),orderqueue;
    end
    if bj=1 and B8>0 and holding=0 and exitbars>1 then begin
    buyshort(1,ss,thisclose);
    bj:=0;
    end

     

  • 金字塔客服: 就是止盈或者止损后本信号内不再开仓

     

  • 用户回复:

    你代码里平仓后就反手开仓了,那个平仓是你的止盈止损吗?

    如果这个是止盈止损 怎么紧接着就反手开仓 这和你要求的止盈止损后本根不再开仓不是刚好相反吗?

     

  • 网友回复:

    贴出你完整的代码,不知道你其中的部分条件是什么。

    图表每条交易语句只会在同一根K上开仓一次。不知道你说的指的是什么意思、

     

  • 网友回复: 回三楼 就是止盈止损后  没有反手开仓是接着上次的信号继续开仓了
打印本文打印本文 关闭窗口关闭窗口