1)当开多条件成交,开多,以开多最近2K低点止损保护。
2)当平多条件成立,平多以条件成立当条K线最低点被破平仓。
如何编写? 谢谢。
2)当平多条件成立,平多以条件成立当条K线最低点被破平仓。
这个不是已经平了,后面还要怎么平?
1)当开多条件成交,开多,以开多最近2K低点止损保护。
2)当平多条件成立,平多以条件成立当条K线最低点被破平仓。
if 开多条件 then buy(holding=0,1,marketr);
ll:=valuewhen(enterbars=2,llv(l,2));
if enterbars>2 and l<ll then sell(1,0,marketr);
if 平多条件 then sell(1,0,limitr,low);
abb:=(time0-timetot0(dynainfo(207))<=5) or not(islastbar);
if abb then begin
if tmp1=-1 then buyshort(holding=0,1,marketr);
ll:=valuewhen(enterbars=2,llv(l,2));
if enterbars>2 and l<ll then sell(1,0,marketr);
if holding<0 and bi=-1 then sell(1,0,limitr,low);
if tmp=1 then buy(holding=0,1,marketr);
ll:=valuewhen(enterbars=2,llv(l,2));
if enterbars>2 and l<ll then sell(1,0,marketr);
if holding>0 and bi=1 then sell(1,0,limitr,low);
end