把交易的部分换下试下。
if C>(MAH*1.002) and MAH>REF(MAH,1) and C>HH and C<MA22*1.08 then buy(holding=0,k,market);
if C<(MAL*0.998) and MAL<REF(MAL,1) and C<LL and C>MA22*0.92 then buyshort(holding=0,k,market);
if C<REF(LLV(C,10),ENTERBARS+2)-2*ATR then sell(1,holding,market);//开仓K线前10个周期收盘价的最低价-2*ATR止损;
if C>REF(HHV(C,10),ENTERBARS+2)+2*ATR then sellshort(1,holding,market);//开仓K线前10个周期收盘价的最高价+2*ATR止损
if C>llv(l,ENTERBARS+1)*1.055 then sellshort(1,holding,market);//固定回撤平空单
if C<hhv(h,ENTERBARS+1)*0.945 then sell(1,holding,market);//固定回撤平多单
if GGLLL>HLGLP then
begin
sell(1,holding,market);
sellshort(1,holding,market);
end
if C<ENTERPRICE-3*ATR then sell(1,holding,market);
if C>ENTERPRICE+3*ATR then sellshort(1,holding,market);
if CROSS(MA22,MA11) or C<MAL then sell(1,holding,market);
if CROSS(MA11,MA22)or C>MAH then sellshort(1,holding,market);
//MID<REF(MID,60),SP(BKVOL);
//MID>REF(MID,60),BP(SKVOL);
if hhv(h,ENTERBARS+1)>MA22*1.08 and C<hhv(h,ENTERBARS+1)-3*ATR then sell(1,holding,market);
if llv(l,ENTERBARS+1)<MA22*0.92 and C>llv(l,ENTERBARS+1)+3*ATR then sellshort(1,holding,market);
if hhv(h,ENTERBARS+1)>MAC*1.08 and C< hhv(h,ENTERBARS+1)-6*ATR then sell(1,holding,market);
if llv(l,ENTERBARS+1)<MAC*0.92 and C>llv(l,ENTERBARS+1)+6*ATR then sellshort(1,holding,market);
if COUNT(ATR>MATR*1.7,10)>=3 and C<LV(C,30) then sell(1,holding,market);
if COUNT(ATR>MATR*1.7,10)>=3 and C>HV(C,30) then sellshort(1,holding,market);
if hhv(h,ENTERBARS+1)- ENTERPRICE>C/70 and (C-ENTERPRICE)/(hhv(h,ENTERBARS+1)-ENTERPRICE)<=0.2 then sell(1,holding,market);
if ENTERPRICE-llv(l,ENTERBARS+1)>C/70 and (ENTERPRICE-C)/(ENTERPRICE-llv(l,ENTERBARS+1))<=0.2 then sellshort(1,holding,market);
//CLOSEKLINE(2,10);
CLOSEKLINE 这个我们无法实现。没办法做这个信号复核的。