M 21 1000 1
MA7:EMA(CLOSE,7),COLORFFFFFF;
MID:MA(CLOSE,m),COLORYELLOW;
UPPER:MID+2*STD(CLOSE,m),COLORRED,DOTLINE;
LOWER:MID-2*STD(CLOSE,m),COLORGREEN,DOTLINE;
AA:=MA((2*CLOSE+HIGH+LOW)/4,5);
通1:=AA*102/100;
通2:=AA*(200-102)/100;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,CIRCLEDOT,COLOR0099FF;
下:(1-7/100)*DD,CIRCLEDOT,COLOR0099FF;
中:(上+下)/2,CIRCLEDOT,COLOR0099FF;
上卖:(1+14/100)*DD,CIRCLEDOT,COLOR0099FF;
下买:(1-14/100)*DD,CIRCLEDOT,COLOR0099FF;
PARTLINE(上,上>=REF(上,1),RGB(255,0,255)),CIRCLEDOT;
PARTLINE(中,中>=REF(中,1),RGB(0,255,255)),CIRCLEDOT;
PARTLINE(下,下>=REF(下,1),RGB(255,0,255)),CIRCLEDOT;
A := DISPSTATUS=2;
DRAWTEXT(A AND 上,上,NUMTOSTRN(上,3)),Color00FFFF;
DRAWTEXT(A AND 中,中,NUMTOSTRN(中,3)),ColorFFFF00;
DRAWTEXT(A AND 下,下,NUMTOSTRN(下,3)),Color00FF00;
DRAWTEXT(A AND 上卖,上卖,NUMTOSTRN(上卖,3)),Color0000FF;
DRAWTEXT(A AND 下买,下买,NUMTOSTRN(下买,3)),ColorEA91B5;
LC:=REF(CLOSE,1);
止损价位:(LC*1.0035*97+0.2)/99.65,COLORRED,LINETHICK0;