我是用区别的止盈策略。
hh:=hhv(h,enterbars+1);
if hhv(h,enterbars+1)>=enterprice+4*s and 止盈条件 and c<=L20 then begin
sell(1,0,market);
end
else begin
if hh>=enterprice+4*s then begin
sell(1,0,market);
end
end
这样写之后,全部还是后面这一种止盈方式。得不到区别的止盈效果,是哪里写错了,老师帮我看一下。
在hh>=enterprice+4*s成立的同时 止盈条件 and c<=L20不成立
else begin
后面加
if hh>=enterprice+4*s then begin
。。
end
这样写能成立吗?