老师好 我这样为什么不能实现每个信号下只开平仓一次呢 只要止盈或者止损后就会继续开平仓 麻烦老师帮忙给改正一下 谢谢 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;
end
if B8>0 then begin
sell(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上开仓一次。不知道你说的指的是什么意思、
回三楼 就是止盈止损后 没有反手开仓是接着上次的信号继续开仓了
不明白为什么止盈或者止损后会继续开仓 我想止盈止损后在本信号内不再开仓
if bj=1 and B8<=0 and holding=0 and exitbars>0 then begin
if bj=1 and B8>0 and holding=0 and exitbars>0 then begin
改成0了还是不行呢
设置了10个点止盈 10个点止损 只要止盈或者止损了还是继续开仓 只要下一个信号之前出现止盈或者止损了就不停开平仓