KD变色3(日-年)2
{橙色表示K值>50,青色表示K值<50;棕色表示D值>50,灰色表示D值<50.}
KR :="kdj.K#DAY" ;
KZ :="kdj.K#WEEK" ;
KY :="kdj.K#MONTH" ;
KN :="kdj.K#YEAR" ;
{}
DR :="kdj.D#DAY" ;
DZ :="kdj.D#WEEK" ;
DY :="kdj.D#MONTH" ;
DN :="kdj.D#YEAR" ;
{}
P:=SYSPARAM(1);
VERTLINE(BARPOS=DATACOUNT-28),COLOR00AAAA,LINETHICK2;
VERTLINE(BARPOS=DATACOUNT),COLOR00AAAA,LINETHICK2;
STICKLINE(BARPOS=DATACOUNT-14,100,100,280,0),COLOR00AAAA;
STICKLINE(BARPOS=DATACOUNT-14,-80,-80,280,0),COLOR00AAAA;
{}
STICKLINE(BARPOS=DATACOUNT-22 and KR[P] >=50,0,KR[P] ,40,0),COLOR0088DD;
STICKLINE(BARPOS=DATACOUNT-22 and KR[P] <50,0,KR[P] ,40,0),COLORFFDD00;
STICKLINE(BARPOS=DATACOUNT-16 and KZ[P] >=50,0,KZ[P] ,40,0),COLOR0088DD;
STICKLINE(BARPOS=DATACOUNT-16 and KZ[P] <50,0,KZ[P] ,40,0),COLORFFDD00;
STICKLINE(BARPOS=DATACOUNT-10 and KY[P] >=50,0,KY[P] ,40,0),COLOR0088DD;
STICKLINE(BARPOS=DATACOUNT-10 and KY[P] <50,0,KY[P] ,40,0),COLORFFDD00;
STICKLINE(BARPOS=DATACOUNT-4 and KN[P] >=50,0,KN[P] ,40,0),COLOR0088DD;
STICKLINE(BARPOS=DATACOUNT-4 and KN[P] <50,0,KN[P] ,40,0),COLORFFDD00;
{}
STICKLINE(BARPOS=DATACOUNT-21 and DR[P] >=50,0,DR[P] ,20,0),COLORBROWN;
STICKLINE(BARPOS=DATACOUNT-21 and DR[P] <50,0,DR[P] ,20,0),COLORGRAY;
STICKLINE(BARPOS=DATACOUNT-15 and DZ[P] >=50,0,DZ[P] ,20,0),COLORBROWN;
STICKLINE(BARPOS=DATACOUNT-15 and DZ[P] <50,0,DZ[P] ,20,0),COLORGRAY;
STICKLINE(BARPOS=DATACOUNT-9 and DY[P] >=50,0,DY[P] ,20,0),COLORBROWN;
STICKLINE(BARPOS=DATACOUNT-9 and DY[P] <50,0,DY[P] ,20,0),COLORGRAY;
STICKLINE(BARPOS=DATACOUNT-3 and DN[P] >=50,0,DN[P] ,20,0),COLORBROWN;
STICKLINE(BARPOS=DATACOUNT-3 and DN[P] <50,0,DN[P] ,20,0),COLORGRAY;
{}
DRAWTEXT(BARPOS=DATACOUNT-27,-30,'K:'),COLORGREEN;
DRAWTEXT(BARPOS=DATACOUNT-27,-52,'D:'),COLORGREEN;
DRAWTEXT(BARPOS=DATACOUNT-24,-10,' 日'),COLORWHITE;
DRAWTEXT(BARPOS=DATACOUNT-18,-10,' 周'),COLORWHITE;
DRAWTEXT(BARPOS=DATACOUNT-12,-10,' 月'),COLORWHITE;
DRAWTEXT(BARPOS=DATACOUNT-6, -10,' 年'),COLORWHITE;
{}
DRAWTEXT(BARPOS=DATACOUNT-24,-30,NUMTOSTR(KR[p],2)),COLOR0088FF;
DRAWTEXT(BARPOS=DATACOUNT-18,-30,NUMTOSTR(KZ[p],2)),COLOR0088FF;
DRAWTEXT(BARPOS=DATACOUNT-12,-30,NUMTOSTR(KY[p],2)),COLOR0088FF;
DRAWTEXT(BARPOS=DATACOUNT-6, -30,NUMTOSTR(KN[p],2)),COLOR0088FF;
{}
DRAWTEXT(BARPOS=DATACOUNT-24,-55,NUMTOSTR(DR[p],2)),COLORYELLOW;
DRAWTEXT(BARPOS=DATACOUNT-18,-55,NUMTOSTR(DZ[p],2)),COLORYELLOW;
DRAWTEXT(BARPOS=DATACOUNT-12,-55,NUMTOSTR(DY[p],2)),COLORYELLOW;
DRAWTEXT(BARPOS=DATACOUNT-6, -55,NUMTOSTR(DN[p],2)),COLORYELLOW;
{}
{}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORWHITE,PRECISION2,LINEDOT;
D:SMA(K,3,1),COLORYELLOW,PRECISION2;
PARTLINE(D>REF(D,1),D),LINETHICK2,COLORYELLOW;PARTLINE(D<REF(D,1),D),COLORFFBBBB;
KZ:MA("kdj.K#WEEK",5),COLORGREEN,LINETHICK;
PARTLINE(KZ>REF(KZ,1),KZ),COLORGREEN,LINETHICK2;PARTLINE(KZ<REF(KZ,1),KZ),COLORFFAA00;
{}
DRAWTEXTEX(kz and BARSTATUS=2,1,10,150,'周线机会满仓操作'+' '),COLOR0088ff,ALIGN1;
|