帮忙看看这个 K线走完模式,但我想盘中及时的触发止损,但止损但单没有盘中触发,而是等待K线走完了才下单,看看怎么改才能及时触发止损
stoploss:=15;
ma1:ma(c,5);
ma2:ma(c,10);
longcond:=cross(ma1,ma2) ;
shortcond:=cross(ma2,ma1);
sell(holding>0 and L<enterprice-stopLoss,0,limitr,enterprice-stopLoss),orderqueue;
sellshort(holding<0 and h>enterprice+stopLoss,0,limitr,enterprice+stopLoss),orderqueue;
if shortcond then begin
sell(1,1,thisclose);
buyshort(1,1,thisclose);
end
if longcond then begin
sellshort(1,1,thisclose);
buy(1,1, thisclose);
end
hold:holding,noaxis ,linethick0 ;
[此贴子已经被作者于2012-3-8 10:31:36编辑过]