MA10:=MA(C,10);
买入:=BArslASTCOUNT(C>MA10)=2 AND C>REF(C,10);
卖出:=BARSLASTCOUNT(C<MA10)=2 AND C<REF(C,10);
收盘线:C;
B2:=BARSLAST(买入);
S2:=BARSLAST(卖出);
FBUY:=crOSS(S2,B2);
FSELL:=CROSS(B2,S2);
滤买:=买入 AND FBUY;
滤卖:=卖出 AND FSELL;
STICKLINE(滤买,L,H,1,0),COLORRED;
STICKLINE(滤卖,L,H,1,0),COLORGREEN;
涨幅:=VAR2STR(100*C/REF(C,BARSLAST(滤买))-100,0);
DRAWTEXT(滤卖,C+1,涨幅);
DRAWLINE(滤买,C,滤卖,C,0),COLORWHITE,DOTLINE;