A:DRAWLINE(L=LLV(L,BARSLAST(CROSS(E10,E5))+1) AND L=LLV(L,5) AND E5<=E10,L,H=HHV(H,BARSLAST(CROSS(E5,E10))+1) AND H=HHV(H,5) AND E5>=E10,H,0),COLORRED;
B:DRAWLINE(H=HHV(H,BARSLAST(CROSS(E5,E10))+1) AND H=HHV(H,5) AND E5>=E10,H,L=LLV(L,BARSLAST(CROSS(E10,E5))+1) AND L=LLV(L,5) AND E5<=E10,L,0),COLORGREEN;
DRAWTEXT(H=A,H,'卖出');
DRAWTEXT(L=B,L,'买入');
E5:EMA(C,5),COLORLIGRAY;
E10:EMA(C,10),COLORMAGENTA;
A:DRAWLINE(L=LLV(L,BARSLAST(CROSS(E10,E5))+1) AND L=LLV(L,5) AND E5<=E10,L,H=HHV(H,BARSLAST(CROSS(E5,E10))+1) AND H=HHV(H,5) AND E5>=E10,H,0),COLORRED;
B:DRAWLINE(H=HHV(H,BARSLAST(CROSS(E5,E10))+1) AND H=HHV(H,5) AND E5>=E10,H,L=LLV(L,BARSLAST(CROSS(E10,E5))+1) AND L=LLV(L,5) AND E5<=E10,L,0),COLORGREEN;
DRAWTEXT(H=A,H,'卖出');
DRAWTEXT(L=B,L,'买入');