INPUT:M(1,0,1),N(5,1,30);
DRAWGBKlast(c>0,strip(RGB(0,200,200),RGB(0,0,100),0));
{K线JHJ}
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),LOW,HIGH,0.1,0),colorred;
STICKLINE(CLOSE>OPEN or CLOSE=OPEN and CLOSE>REF(CLOSE,1),OPEN,CLOSE,8,0),colorred;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),LOW,HIGH,0.1,0),colorcyan;
STICKLINE(CLOSE<OPEN or CLOSE=OPEN and CLOSE<=REF(CLOSE,1),OPEN,CLOSE,8,0),colorcyan;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,8,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,7,0 ),COLOR009900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,6,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,5,0 ),COLOR00BB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,4,0 ),COLOR00CC00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00EE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00FF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0) ,COLOR000066;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,7,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,6,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0) ,COLOR0000BB;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4,0) ,COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000EE;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
{1.RSI}
LC:=REF(C,1);
RSI:((SMA(MAX((C - LC),0),3,1) / SMA(ABS((C - LC)),3,1)) * 100),LINETHICK0;
DRAWTEXT(CROSS(RSI,81) ,high*1.03,'RSI.'+NUMTOSTRN(RSI,0)+''),COLOR00ffFF,ALIGN1,LINETHICK1;
DRAWTEXT(DISPSTATUS=2, H*1.02,'【RSI:'+NUMTOSTRN(RSI,0)+'】'),COLOR00FFFF,LINETHICK2,ALIGN1;
{勿忘九一八--------------通道}
上18H:WMA(SMA(hhv(HIGH,18),9/2,1),3),COLOR00FF00;
下18L:WMA(SMA(llv(LOW,18),9/2,1),3),COLOR009900;
通道:(上18H+下18L)/2,COLOR0598FF,DOTLINE;
FILLRGN(上18H,通道,上18H>通道,RGB(0,0,255)),LAYER7;
FILLRGN(下18L,通道,下18L<通道,RGB(50,50,50)),LAYER7;
中18C:WMA(SMA(C,18,1),3),COLORFF9900;
{MA9}
MA9:WMA(C,9),COLOR00FF00,DOTLINE;
PARTLINE(MA9 ,(MA9>REF(MA9,1)),rgb(255,155,0) ),linethick3,LAYER0;
X:=BARSLAST(DISPSTATUS=1)+1;
AH1:hhv(h,X),COLOR0077FF,DOTLINE;
AL2:llv(l,X),COLORFF9900,DOTLINE;
HLZ:(AH1+AL2)/2,COLOR00FFFF,DOTLINE;
下跌:LAST(AH1>H),PRECIS0 ,LINETHICK0;
上涨:LAST(Al2<L),PRECIS0 ,LINETHICK0;
DRAWTEXT(DISPSTATUS=2,AH1,'----【'+NUMTOSTRN(AH1,2)+'元:跌'+NUMTOSTRN((C-AH1)/AH1*100,1)+'%.'+NUMTOSTRN(下跌,0)+'天】---- '),ALIGN1,Color00FFFF,linethick3,LAYER0;
DRAWTEXT(DISPSTATUS=2,Al2,'----【'+NUMTOSTRN(AL2,2)+'元:涨'+NUMTOSTRN((C-AL2)/AL2*100,1)+'%.'+NUMTOSTRN(上涨,0)+'天】---- '),ALIGN1,VALIGN2,Color00ff00,linethick3,LAYER0;