ER:=SUM(ABS(DIRECTION/VOLATILITY),1);
FASTC:=2/(N+1);
SLOWC:=2/(M+1);
SMOOTH:=ER*( FASTC- SLOWC)+ SLOWC;
SE:=SMOOTH* SMOOTH;
YY:=REF(CLOSE,1)+SE*(CLOSE-REF(CLOSE,1));
AA:=IF(SUM(1,0)=T+1,YY,0);
BB:=BARSLAST(AA
CC:=REF(CLOSE,BB);
AMA1:=REF(CC,1)+SE*CLOSE-REF(CC,1);
AMA2:DMA(CLOSE,SE),COLORFFAA00,LINETHICK2;
BUY:=CROSS(AMA1,AMA2)AND AMA2 REF(AMA2,1);
SELL:=CROSS(AMA2,AMA1);
持股:AMA1 AMA2,NODRAW,COLORRED;
持币:AMA1 =AMA2,NODRAW,COLORGREEN;
趋势向上:IF(AMA2 REF(AMA2,1),AMA2,DRAWNULL),COLORFF00FF,LINETHICK2;