DIRECTION:=CLOSE-REF(CLOSE,10);
VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),10);
ER:=ABS(DIRECTION/VOLATILITY);
FASTSC:=2/(2+1);
SLOWSC:=2/(30+1);
SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;
CONSTANT:SSC*SSC;
AMA1:EMA(DMA(CLOSE,CONSTANT),1),COLORGREEN,LINETHICK3;
AMA2:EMA(DMA(CLOSE,CONSTANT),10),COLORGREEN,LINETHICK3;
BK:=CROSS(AMA1 REF(AMA1, 1) AMA2 REF(AMA2, 1) AMA1 AMA2,0.5);
SK:=CROSS(AMA1 REF(AMA1, 1) AMA2 REF(AMA2, 1) AMA1 AMA2,0.5);
SP:=CROSS(AMA1 REF(AMA1, 1) || AMA2 REF(AMA2, 1) || AMA1 AMA2,0.5);
BP:=CROSS(AMA1 REF(AMA1, 1) || AMA2 REF(AMA2, 1) || AMA1 AMA2,0.5);
DRAWTEXT(BK,L,多),COLORRED,VALIGN0;
DRAWTEXT(SK,H,空),COLORGREEN,VALIGN2;
DRAWTEXT(SP,H,平多),COLORGREEN,VALIGN2;