N:=20;
P:=1;
MID : MA(CLOSE,N);
UPPER: MID + P*STD(CLOSE,N),colorred;
LOWER: MID - P*STD(CLOSE,N),colorgreen;
DRAWKLINE(H,O,L,C);
攻击:IF(MID>REF(MID,1),MID,DRAWNULL),colorred,LINETHICK3;
防守:IF(MID<REF(MID,1),MID,DRAWNULL),colorgreen,LINETHICK3;
RC1:=REF(C,1);
CS:=IF(C>=1,10000,100000);
C涨停10:=1.10*RC1-49/CS;
C涨停5 :=1.05*RC1-49/CS;
C跌停10:=0.90*RC1+51/CS;
C跌停5 :=0.95*RC1+51/CS;
ST:=NAMELIKE('S') OR NAMELIKE('*S');
涨停:= IF(ST, C>=C涨停5, C>=C涨停10);
跌停:= IF(ST, C<=C跌停5, C<=C跌停10);
STICKLINE(涨停,OPEN,CLOSE,6,0),coloryellow;
STICKLINE(跌停,OPEN,CLOSE,6,0),colorblue;