{参数: N1(最小2,最大250,缺省5) N2(最小2,最大150,缺省10)}
SHI:=REF(CLOSE,1);
SHOU:SMA(MAX(CLOSE-SHI,0),N1,1)/SMA(ABS(CLOSE-SHI),N1,1)*100;
TOU:SMA(MAX(CLOSE-SHI,0),N2,1)/SMA(ABS(CLOSE-SHI),N2,1)*100;
FILLRGN(shou,tou,shou>=tou,rgb(255,255,0),shou<tou,rgb(0,255,0));
AA:95,COLORRED;
BB:90,COLORMAGENTA;
CC:45,COLORWHITE;
DD:80,COLORYELLOW;
EE:10,COLORGREEN;
DRAWTEXT(BARSTATUS=2,AA,'清仓');
DRAWTEXT(BARSTATUS=2,BB,'减仓');
DRAWTEXT(BARSTATUS=2,DD,'警觉');
FILLRGN(shou,dd,shou>=dd,rgb(255,0,0));