if DYNAINFO( 31)>100 then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);
if DYNAINFO( 31)>100 then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);
开空的成交价用买一价来成交。不用市价
if DYNAINFO( 31)>100 then tbuyshort(tsellholding(0)=0,1,mkt);
if tenterprice-dynainfo(7)>0.6 then tsellshort(1,0,mkt);
if DYNAINFO( 25)<50 then tsellshort(1,0,lmt,dynainfo(7)-0.6);
不是这个意思。。。
是买完之后直接止盈。不是满足条件之后卖。
if DYNAINFO( 31)>100 then begin
tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
tsellshort(1,0,tenterprice-0.6);
end
if DYNAINFO( 25)<50 then begin
TCANCELEX(islastbar ,0 ,'' ,'' );
tsellshort(1,0,lmt,dynainfo(7)-0.6);
end
if DYNAINFO( 31)>100 then begin
tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
tsellshort(1,0,tenterprice-0.6);
end
if DYNAINFO( 25)<50 then begin
TCANCELEX(islastbar ,0 ,'' ,'' );
tsellshort(1,0,lmt,dynainfo(7)-0.6);
end
还是有问题。发现不进行交易啊。预警全是平空信号
if DYNAINFO( 31)>100 then begin
tbuyshort(tsellholding(0)=0,1,lmt,DYNAINFO( 28),0);
tsellshort(tsellholding(0)>0,0,tenterprice-0.6);
end
if DYNAINFO( 25)<50 then begin
TCANCELEX(islastbar ,0 ,'' ,'' );
tsellshort(tsellholding(0)>0,0,lmt,dynainfo(7)-0.6);
end
这样限定了一下,有持仓才出平仓信号