自用板块KDJ (副图 说明 源码 贴图)
各板块的强弱走势 非常直观
{板块KDJ}
{开盘价:("999999$OPEN");}
N:=27;T:=80;
M1:=6;M2:=5;
大盘:=(INDEXC-LLV(INDEXL,N))/(HHV(INDEXH,N)-LLV(INDEXL,N))*100
,COLOR000080,NODRAW;
大盘K:=SMA(大盘,M1,1),COLORRED,LINETHICK1,NODRAW;
大盘D:=SMA(大盘K,M2,1),COLORC080FF,LINETHICK1,NODRAW;
大盘能量背景:=3*大盘K-2*大盘D,COLOR000080,LINETHICK2;
DRAWBAND(大盘能量背景,RGB(70,20,20),50,RGB(80,80,80));
{主图KDJ}
RSV100:=(C-LLV(L,N))/(HHV(H,N)
-LLV(L,N))*100;
K100:=SMA(RSV100,M1,1),COLORRED,LINETHICK1;
D100:=SMA(K100,M2,1),COLORC080FF,LINETHICK1;
DRAWBAND(K100,RGB(230,96,213),D100,RGB(0,100,50));
主股:3*K100-2*D100,COLOR0000FF,LINETHICK2,NODRAW;
DRAWBAND(主股,RGB(240,50,50),SMA(主股,2,1),RGB(147,234,249));
{上证}
C01:=("999999$CLOSE");
L01:=("999999$LOW"); H01:=("999999$HIGH");
RSV01:=(C01-LLV(L01,N))/(HHV(H01,N)-LLV(L01,N))*100;
K01:=SMA(RSV01,M1,1),COLORRED,LINETHICK1,NODRAW;
D01:=SMA(K01,M2,1),COLORC080FF,LINETHICK1,NODRAW;
上证:3*K01-2*D01,COLOR000080,LINETHICK2;
{深证}
C02:=("399001$CLOSE");
L02:=("399001$LOW"); H02:=("399001$HIGH");
RSV02:=(C02-LLV(L02,N))/(HHV(H02,N)-LLV(L02,N))*100;
K02:=SMA(RSV02,M1,1),COLORRED,LINETHICK1,NODRAW;
D02:=SMA(K02,M2,1),COLORC080FF,LINETHICK1,NODRAW;
深证:3*K02-2*D02,COLORFF00FF,LINETHICK2;
{三00}
C03:=("399300$CLOSE");
L03:=("399300$LOW"); H03:=("399300$HIGH");
RSV03:=(C03-LLV(L03,N))/(HHV(H03,N)-LLV(L03,N))*100;
K03:=SMA(RSV03,M1,1),COLORRED,LINETHICK1,NODRAW;
D03:=SMA(K03,M2,1),COLORC080FF,LINETHICK1,NODRAW;
三00:3*K03-2*D03,COLORYELLOW,LINETHICK2;
C1:=("399190$CLOSE");
L1:=("399190$LOW"); H1:=("399190$HIGH");
RSV1:=(C1-LLV(L1,N))/(HHV(H1,N)-LLV(L1,N))*100;
K1:=SMA(RSV1,M1,1),COLORRED,LINETHICK1,NODRAW;
D1:=SMA(K1,M2,1),COLORC080FF,LINETHICK1,NODRAW;
金融:3*K1-2*D1,COLOR33CCFF,LINETHICK1;
C2:=("399200$CLOSE");
L2:=("399200$LOW"); H2:=("399200$HIGH");
RSV2:=(C2-LLV(L2,N))/(HHV(H2,N)-LLV(L2,N))*100;
K2:=SMA(RSV2,M1,1),COLORRED,LINETHICK1,NODRAW;
D2:=SMA(K2,M2,1),COLORC080FF,LINETHICK1,NODRAW;
地产:3*K2-2*D2,COLORFF00FF,LINETHICK1;
C3:=("399139$CLOSE");
L3:=("399139$LOW"); H3:=("399139$HIGH");
RSV3:=(C3-LLV(L3,N))/(HHV(H3,N)-LLV(L3,N))*100;
K3:=SMA(RSV3,M1,1),COLORRED,LINETHICK1,NODRAW;
D3:=SMA(K3,M2,1),COLORC080FF,LINETHICK1,NODRAW;
医药:3*K3-2*D3,COLORFFFF00,LINETHICK1;
C4:=("399110$CLOSE");
L4:=("399110$LOW"); H4:=("399110$HIGH");
RSV4:=(C4-LLV(L4,N))/(HHV(H4,N)-LLV(L4,N))*100;
K4:=SMA(RSV4,M1,1),COLORRED,LINETHICK1,NODRAW;
D4:=SMA(K4,M2,1),COLORC080FF,LINETHICK1,NODRAW;
农林:3*K4-2*D4,COLORYELLOW,LINETHICK1;
C5:=("399120$CLOSE");
L5:=("399120$LOW"); H5:=("399120$HIGH");
RSV5:=(C5-LLV(L5,N))/(HHV(H5,N)-LLV(L5,N))*100;
K5:=SMA(RSV5,M1,1),COLORRED,LINETHICK1,NODRAW;
D5:=SMA(K5,M2,1),COLORC080FF,LINETHICK1,NODRAW;
采掘:3*K5-2*D5,COLOR0080FF,LINETHICK1;
C6:=("399131$CLOSE");
L6:=("399131$LOW"); H6:=("399131$HIGH");
RSV6:=(C6-LLV(L6,N))/(HHV(H6,N)-LLV(L6,N))*100;
K6:=SMA(RSV6,M1,1),COLORRED,LINETHICK1,NODRAW;
D6:=SMA(K6,M2,1),COLORC080FF,LINETHICK1,NODRAW;
食品:3*K6-2*D6,COLORC0C0C0,LINETHICK1;
C7:=("399134$CLOSE");
L7:=("399134$LOW"); H7:=("399134$HIGH");
RSV7:=(C7-LLV(L7,N))/(HHV(H7,N)-LLV(L7,N))*100;
K7:=SMA(RSV7,M1,1),COLORRED,LINETHICK1,NODRAW;
D7:=SMA(K7,M2,1),COLORC080FF,LINETHICK1,NODRAW;
造纸:3*K7-2*D7,COLOR808000,LINETHICK1;
C8:=("399137$CLOSE");
L8:=("399137$LOW"); H8:=("399137$HIGH");
RSV8:=(C8-LLV(L8,N))/(HHV(H8,N)-LLV(L8,N))*100;
K8:=SMA(RSV8,M1,1),COLORRED,LINETHICK1,NODRAW;
D8:=SMA(K8,M2,1),COLORC080FF,LINETHICK1,NODRAW;
金属:3*K8-2*D8,COLOR008080,LINETHICK1;
C9:=("399140$CLOSE");
L9:=("399140$LOW"); H9:=("399140$HIGH");
RSV9:=(C9-LLV(L9,N))/(HHV(H9,N)-LLV(L9,N))*100;
K9:=SMA(RSV9,M1,1),COLORRED,LINETHICK1,NODRAW;
D9:=SMA(K9,M2,1),COLORC080FF,LINETHICK1,NODRAW;
水电:3*K9-2*D9,COLOR00FF00,LINETHICK1;
C10:=("399160$CLOSE");
L10:=("399160$LOW"); H10:=("399160$HIGH");
RSV10:=(C10-LLV(L10,N))/(HHV(H10,N)-LLV(L10,N))*100;
K10:=SMA(RSV10,M1,1),COLORRED,LINETHICK1,NODRAW;
D10:=SMA(K10,M2,1),COLORC080FF,LINETHICK1,NODRAW;
运输:3*K10-2*D10,COLORFF8080,LINETHICK1;
C11:=("399138$CLOSE");
L11:=("399138$LOW"); H11:=("399138$HIGH");
RSV11:=(C11-LLV(L11,N))/(HHV(H11,N)-LLV(L11,N))*100;
K11:=SMA(RSV11,M1,1),COLORRED,LINETHICK1,NODRAW;
D11:=SMA(K11,M2,1),COLORC080FF,LINETHICK1,NODRAW;
机械:3*K11-2*D11,COLOR008000,LINETHICK1;
C12:=("399135$CLOSE");
L12:=("399135$LOW"); H12:=("399135$HIGH");
RSV12:=(C12-LLV(L12,N))/(HHV(H12,N)-LLV(L12,N))*100;
K12:=SMA(RSV12,M1,1),COLORRED,LINETHICK1,NODRAW;
D12:=SMA(K12,M2,1),COLORC080FF,LINETHICK1,NODRAW;
石化:3*K12-2*D12,COLOR004080,LINETHICK1;
C13:=("399915$CLOSE");
L13:=("399915$LOW"); H13:=("399915$HIGH");
RSV13:=(C13-LLV(L13,N))/(HHV(H13,N)-LLV(L13,N))*100;
K13:=SMA(RSV13,M1,1),COLORRED,LINETHICK1,NODRAW;
D13:=SMA(K13,M2,1),COLORC080FF,LINETHICK1,NODRAW;
信息:3*K13-2*D13,COLOR004080,LINETHICK1;
C14:=("399150$CLOSE");
L14:=("399150$LOW"); H14:=("399150$HIGH");
RSV14:=(C14-LLV(L14,N))/(HHV(H14,N)-LLV(L14,N))*100;
K14:=SMA(RSV14,M1,1),COLORRED,LINETHICK1,NODRAW;
D14:=SMA(K14,5,1),COLORC080FF,LINETHICK1,NODRAW;
建筑:3*K14-2*D14,COLORFF8000,LINETHICK1;
金叉:IF(CROSS(主股,K100) AND 主股<30,0.9,0),COLOR0000FF,LINETHICK2;
STICKLINE(金叉,0,5,2,0),COLORRED;
STICKLINE(金叉,5,10,1,0),COLORRED;
50,COLOR33CCFF,POINTDOT;
风险:100,COLOR00FF00,POINTDOT;
极弱:20,COLORMAGENTA,POINTDOT;
DRAWTEXT(CURRBARSCOUNT=T,30,'大盘'),COLOR000080;
DRAWTEXT(CURRBARSCOUNT=T-5,30,'背景'),COLORC0C0C0;
DRAWTEXT(CURRBARSCOUNT=T,20,'上证'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=T-5,20,'趋势'),COLOR008000;
DRAWTEXT(CURRBARSCOUNT=T,10,'深证'),COLORFF00FF;
DRAWTEXT(CURRBARSCOUNT=T-5,10,'趋势'),COLORFFCC00;
DRAWTEXT(CURRBARSCOUNT=T,0,'中小'),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=T-5,0,'趋势'),COLOR808000;