DIF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIF,9);
MM:=DIF-DEA;
S:=CROSS(DEA,DIF);
ST:=BARSLAST(S);
KT:=BARSLAST(DEA>DIF);
T:=REF(KT,ST+1);
S2:=S AND T>2;{杜绝短暂的红柱};
DT:=BARSLAST(DEA<0);
J1:=COUNT(S2,DT)=2;
MH:=HHV(MM,KT);
MH2:=REF(MH,ST+1);
ST2:=SUMBARS(S2,2)-1;
MH1:=REF(MH,ST2+1);
J2:=MH1>MH2;
{主图划线}
XG:=S2 AND J1 AND J2;
XGT:=BARSLAST(XG);
XH:=REF(HHV(H,DT),XGT+1);
XL:=REF(LLV(L,BARSLAST(S2)),XGT+1);
X1:=DRAWLINE(XG,XH,REF(XG,1),REF(XH,1),1);
X2:=DRAWLINE(XG,XL,REF(XG,1),REF(XL,1),1);
XX:=EVERY(DEA>0,XGT);
NOTEXT1:IF(XX,X1,DRAWNULL),COLORRED;
NOTEXT2:IF(XX,X2,DRAWNULL),COLORGREEN;
{选股,未公开};