N1:=6;
N2:=6;
N3:=24;
趋势1:SMA(((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100),3,1);
DRAWBAND(趋势1,RGB(255,48,48),80,RGB(0,255,0));
STICKLINE(C>0,80,20,10,0),COLOR000000;
趋势:趋势1,COLORYELLOW;
强:IF(趋势>50,趋势,DRAWNULL),COLORRED,LINETHICK2;
弱:IF(趋势< 50,趋势,DRAWNULL),COLORGREEN,LINETHICK2;
超卖:20,LINETHICK2;
50,LINETHICK2;
超买:80,COLORYELLOW,LINETHICK2;
LC:=REF(CLOSE,1);
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100,COLORYELLOW,LINETHICK2;
DRAWBAND(RSI3,RGB(155,50,50),50,RGB(0,100,50));
RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
DRAWICON(CROSS(趋势1,20),20,1);
DRAWTEXT(CROSS(趋势1,20),REF(趋势1,1),'机会'),COLORYELLOW;
DRAWICON(CROSS(80,趋势1),80,2);
DRAWTEXT(CROSS(80,趋势1),REF(趋势1,1),'风险'),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.68,0.2,1,' ★50线分强弱,背离注意,注意短线风险和机会★ '),COLORFFFF00;