祝大家节日快乐。。。刚上论坛,发现金老师的KDJ-金主图大有学习借鉴的作用,突发奇想,借用融大的轨道线来融合一下,节日期间,金老师放弃宝贵的休息时间,给大家奉献了不少的精品指标,无私的精神值得我们学习,在此向两位老师致敬。。。。。
说明:用法请参考两位老师的说明,能不能给大家一点参考的意见,请各位同学自取所需。。。
Wj:=' ';
yy1:=WEEKDAY;
if C>0 then begin;
Wj:=' 星期';
IF yy1=5 then Wj:= Wj+'五';
IF yy1=4 then Wj:= Wj+'四';
IF yy1=3 then Wj:= Wj+'三';
IF yy1=2 then Wj:= Wj+'二';
IF yy1=1 then Wj:= Wj+'一';
end;
Wl:='';
Wh:='';
yy2:=LMONTH;
yy3:=LDAY;
IF BARSTATUS=2 then Ww:=' 农历 '+NUMTOSTRN(yy2,0)+'月 '+NUMTOSTRN(yy3,0)+'日';
IF BARSTATUS=2 then Wh:=NUMTOSTRN(date+1000000,0);
IF BARSTATUS=2 then Wl:=Wj;
yy2:=LMONTH;
yy3:=LDAY;
DRAWTEXTREL(280 ,80 ,' '+STKLABEL+' '+STKNAME+' '+Wh+Wl+Ww),LINETHICK2,Color0080FF;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,ColorFF00FF;
下:(1-7/100)*DD,ColorFF00FF;
中:(上+下)/2,COLORF0F000,LINETHICK2;
危:(1+14/100)*DD,DOTLINE,COLORGRAY;
机:(1-14/100)*DD,DOTLINE,COLORGRAY;
{涨停天数}
VARZT:=BARSLAST(C/REF(C,1)>1.094);
DRAWTEXT(VARZT=2,L*0.95,'3T'),COLORYELLOW;
DRAWTEXT(VARZT=4,H*1.06,'5T'),COLORYELLOW;
DRAWTEXT(VARZT=7,L*0.95,'8T'),COLORYELLOW;
DRAWTEXT(VARZT=12,H*1.06,'13T'),COLORYELLOW;
DRAWTEXT(VARZT=20,L*0.95,'21T'),COLORYELLOW;
DRAWTEXT(VARZT=33,H*1.06,'34T'),COLORYELLOW;
DRAWTEXT(VARZT=54,L*0.95,'55T'),COLORYELLOW;
DRAWTEXT(VARZT=88,H*1.06,'89T'),COLORYELLOW;
DRAWTEXT(VARZT=143,L*0.95,'144T'),COLORYELLOW;
DRAWTEXT(VARZT=232,H*1.06,'233T'),COLORYELLOW;
DRAWTEXT(VARZT=376,L*0.95,'377T'),COLORYELLOW;
VC:=(2*CLOSE+HIGH+LOW)/4;
K: SLOPE(WMA(VC,5),9)*5+VC,COLOR00FFff,LINETHICK0;
D: WMA(K,3),COLOR00FF00,LINETHICK0;
J: 2.8*K-1.8*D,COLOR0099FF,LINETHICK1;
PARTLINE(J,(J>REF(J,1))-1,rgb(0,100,200),1,rgb(200,100,0) ),LINETHICK3,LAYER0;
MA13:WMA(C,13),PRECIS2;
PARTLINE(ma13,(ma13>REF(ma13,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK2,LAYER0;
{高抛.低吸}
重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;
SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);
DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,J,'←低吸'),COLOR00FFFF,LINETHICK1;
DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,J,'←高抛'),COLOR0044FF,LINETHICK1;
{涨跌幅度}
X:=BARSLAST(DISPSTATUS=1)+1;
AH1:hhv(h,X),COLOR0077FF,DOTLINE,LINETHICK0;
AL2:llv(l,X),COLORFF9900,DOTLINE,LINETHICK0;
HLZ:(AH1+AL2)/2,COLOR00FFFF,DOTLINE,LINETHICK0;
下跌: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,linethick1,LAYER0;
DRAWTEXT(DISPSTATUS=2,Al2,'----【'+NUMTOSTRN(AL2,2)+'元:涨'+NUMTOSTRN((C-AL2)/AL2*100,1)+'%.'+NUMTOSTRN(上涨,0)+'天】---- '),ALIGN1,VALIGN2,Color00ffFF,linethick1,LAYER0;
{以下设置个股信息}
DRAWTEXTREL(10,35,'所属板块:'+BKNAME),COLORFFFFFF;
DRAWTEXTREL(10,150,'总股本【亿】:'+FINANCE2(35)/10000),Color00FF00;
DRAWTEXTREL(190,150,'流通盘【亿】:'+CAPITAL/100/10000),Color00FF00;
DRAWTEXTREL(10,110,'总市值【亿】:'+DYNAINFO(56)/100000000),Color00FF00;
DRAWTEXTREL(190,110,'流通市值【亿】:'+DYNAINFO(57)/100000000),Color00FF00;
DRAWTEXTREL(10,75,'市盈率:' + DYNAINFO(39) + '倍' + ' 每股收益:' + FINANCE2(3) + '元' + ' 每股公积金:' + FINANCE2(7) + '元'),Color00FFFF;
DRAWTEXTREL(10,200,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+' 家'),COLOR0000FF;
DRAWTEXTREL(120,200,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+' 家'),COLOR00FF00;
DRAWTEXTREL(230,200,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)+' 家'),COLORFFFFFF;
通达信版源码:
VC:=(2*CLOSE+HIGH+LOW)/4;
K: SLOPE(WMA(VC,5),9)*5+VC,COLOR00FFFF,LINETHICK0;
D: WMA(K,3),COLOR00FF00,LINETHICK0;
J: 2.8*K-1.8*D,COLOR0099FF,LINETHICK1;
MA5:MA(C,5),COLOR00FF00,LINETHICK1;
DRAWBAND(J,RGB(0,0,255),MA5,RGB(80,80,80));
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLOR0077FF,LINETHICK3;
2.8*K-1.8*D,COLORFF9900,LINETHICK1;
IF(J>REF(J,1),J,DRAWNULL),COLOR0000FF,LINETHICK3;
{高抛.低吸}
重心:(2*C+H+L)/4,COLOR00FFFF,LINETHICK0;
SJ:=WMA((重心-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);
DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,J,'←低吸'),COLOR00FFFF,LINETHICK2;
DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,J,'←高抛'),COLOR0044FF,LINETHICK2;
{K线}
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0.0,0),COLORRED;
STICKLINE(CLOSE<OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0.0,0),COLORCYAN;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLOR008800;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2,0 ),COLOR00AA00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1,0 ),COLOR00DD00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLOR00FF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0) ,COLOR000088;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2,0) ,COLOR0000AA;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1,0) ,COLOR0000DD;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,0) ,COLOR0000FF;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
DD:=DMA(CLOSE,CC);
上:(1+7/100)*DD,COLORFF00FF;
下:(1-7/100)*DD,COLORFF00FF;
中:(上+下)/2,COLORF0F000,LINETHICK2;
危:(1+14/100)*DD,DOTLINE,COLORGRAY;
机:(1-14/100)*DD,DOTLINE,COLORGRAY;
|