短期趋势线:MA(C,5),COLORWHITE,LINETHICK2;
IF(短期趋势线>REF(短期趋势线,1),短期趋势线,DRAWNULL),COLORRED,LINETHICK2;
IF(短期趋势线
X:=(3*C+L+O+H)/6;
长期趋势线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)
+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)
+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+
REF(X,20))/210,COLORRED,LINETHICK2;
DD:=长期趋势线
IF(DD,长期趋势线,DRAWNULL),COLORGREEN,LINETHICK2;
A:=(短期趋势线>长期趋势线);
IF(A,长期趋势线,DRAWNULL),COLORYELLOW,POINTDOT,LINETHICK4;
B:=(短期趋势线<长期趋势线);
IF(B,长期趋势线,DRAWNULL),COLORBLUE,POINTDOT,LINETHICK4;
PL5:=HHV(H,18);
DRAWTEXT(C AND CURRBARSCOUNT=50 ,PL5*0.98, ' '),COLORYELLOW;
DRAWTEXT(C AND CURRBARSCOUNT=50 ,PL5*0.99, ' '),COLORRED;