J:=7;
CS:=9;
CX:=19;
系:=REF(CLOSE,X);
数:=C-系;
基:=SMA(MAX(数,0),J,1);
础:=SMA(ABS(数),CS,1);
输:=基/础+0.17;
出:=XMA(XMA(输,CX),CX);
趋势线:IF(31,MA(输,5),832)COLORGRAY,LINETHICK2;
上轨:出+0.1,COLORRED;
下轨:出-0.11,COLORGREEN;
卖:IF(上轨<=REF(上轨,1),DRAWNULL,上轨),COLORLIMAGENTA,LINETHICK2;
买:IF(趋势线<=REF(趋势线,1) AND 趋势线<下轨,趋势线,DRAWNULL),COLORYELLOW,LINETHICK6;
DRAWTEXT(买 AND 卖,买,'$'),COLORLIMAGENTA;
DRAWICON( 上轨<=REF(上轨,1) AND 趋势线>REF(趋势线,1) AND 趋势线<下轨 ,下轨,13),COLORRED;
DRAWICON( 上轨<=REF(上轨,1) AND 趋势线>REF(趋势线,1) AND 趋势线>=上轨 ,上轨,15),COLORRED;
DRAWICON(CROSS(下轨,趋势线) ,下轨,7),COLORRED;
DRAWICON(CROSS(趋势线,上轨) ,上轨,20),COLORRED;
好:DRAWTEXT(趋势线<=下轨 AND 趋势线>=REF(趋势线,1) ,下轨,'●'),COLORRED;