还是老问题:平多盈利执行不及时,盈利全部吃光:程序源码
//开多
IF ( stopprice)<l THEN
BEGIN
SELLSHORT( HOLDING<0,HOLDING,market); //平空操作
BUY( HOLDING=0,1,market);//开多操作
maxprofit:=0;
END
//平仓
SELL((stopprice)>h and HOLDING>0,HOLDING,market);//平多
BUYSHORT((stopprice)>h and HOLDING=0,1,market); //开空操作
if enterbars>=3 then begin
if c>o and holding>0 then sell(1,holding,market);
if c<o and type(1)= 2 then buy(holding>=0,1,market);
end
//空头为例
if enterbars>=3 then begin
if c>o and holding<0 then sellshort(1,holding,market);
if c<o and type(1)=4 then buyshort(holding<=0,1,market);
end
那根k线是阴线,怎么会出信号的?