VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;
D线: (20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF(VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2,10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4*REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210, CIRCLEDOT;
K线: MA(D线,10), CIRCLEDOT;
STICKLINE(D线>K线,D线,K线,3,10), , COLORRED;
STICKLINE(D线<K线,D线,K线,3,10), ,COLORGREEN;
DRAWTEXT(CROSS(D线,K线),D线,'始');
DRAWTEXT(CROSS(K线,D线),K线,'终');