DRAWGBK(1,RGB(0,0,0),RGB(0,0,0),0,'63755',0); DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
VAR1:=ZIG(3,10)<REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG(3,10),2);{ZIG 有未来}
VAR2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
STICKLINE(VAR1,C,O,8,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR1,C,O,3,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR1,H,L,1,0),COLORYELLOW,LINETHICK2;{高位黄s}
STICKLINE(VAR2,C,O,8,0),COLORFF00FF,LINETHICK2;{底位红色}
STICKLINE(VAR2,C,O,3,0),COLORFF00FF,LINETHICK2;{底位红色}
STICKLINE(VAR2,H,L,1,0),COLORFF00FF,LINETHICK2;{底位红色};
DRAWTEXT_FIX(ISLASTBAR,0,0,0,CODE);
金叉:=CROSS(KDJ.J,KDJ.K);
STICKLINE(金叉,C,C,10,0)COLORRED;
DRAWNUMBER(金叉 AND C>=O,C+0.1,C);
DRAWNUMBER(金叉 AND C<O,C-0.1,C);
涨停:=(CLOSE/REF(CLOSE,1)>=1.1-0.01) AND C=H;
HJJ:=(C*0.809-C)/10;
DRAWTEXT(涨停,(C+REF(C,1))/2,'---------50%%'),COLORYELLOW;
DRAWTEXT(涨停,C+HJJ,'---------0.809%%');
{量能评台}
N:=30;
T1:=CONST(HHVBARS(V,N));
T0:IF(CURRBARSCOUNT<=N+7,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),LINETHICK3;
IF(CURRBARSCOUNT=T1+1,T0,DRAWNULL),CIRCLEDOT;
DRAWTEXT(ISLASTBAR,T0,' 量能评台');
STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,100,0),COLORWHITE,LINETHICK3;
DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95),LINETHICK3;
止损点:=(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95),LINETHICK3;
DRAWTEXT(ISLASTBAR ,止损点,' 止损点'),LINETHICK3;
年线: DMA(MA(CLOSE+REF(CLOSE,5)/CLOSE*0.098,250),VOL),LINETHICK2,POINTDOT,COLOR30CC00;
DRAWTEXT(HIGH>=REF(CLOSE,1)*1.095,HIGH,'涨停'),COLORMAGENTA;
STICKLINE(V/REF(V,1)>2,OPEN,CLOSE,1,0),COLORGREEN;
DRAWTEXT(REF(CLOSE,1)>=LOW*1.095,LOW,'跌停'),COLORGREEN;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),H*1.01,'卖'),COLORGREEN;A:=TROUGH(3,10,1);
B:=TROUGHBARS(3,10,1)=0;
画底线:DRAWLINE(B,A,B,A,0),COLORYELLOW;
D:=PEAK(3,10,1);
E:=PEAKBARS(3,10,1)=0;
画顶线:DRAWLINE(E,D,E,D,0),COLORRED,LINETHICK2;
Z:ZIG(3,10),COLORFFFFFF;TC1:=IF(H=HHV(H,8*UR),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,8*LR),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}
STICKLINE(IF(BC2>TC2,HP,LP),LOWER,UPPER,0,0),COLOR628962;
STICKLINE(IF(BC2>TC2,LP,HP),LOWER,UPPER,0,0),COLOR628962;
NOD:=(IF(TC2>BC2,TC2,BC2)-IF(TC2>BC2,BC2,TC2));{用时}
LR1:=FORCAST(C,NOD+1);
NP:IF(CURRBARSCOUNT<=MAX(BC2,TC2),CONST(IF(MIN(TC2,BC2)=1,LR1,REF(LR1,MIN(TC2,BC2)-1))),DRAWNULL),POINTDOT,COLOR93BDA8;{近点}
LR2:=SLOPE(C,NOD+1);
LR3:=CONST(IF(MIN(TC2,BC2)=1,LR2,REF(LR2,MIN(TC2,BC2)-1)));
FP:NP-LR3*(NOD),POINTDOT,COLOR93BDA8;{远点}
EQU:(NP+FP)/2,POINTDOT,COLOR93BDA8;
AD:=ABS(NP-FP);{高差};
DBL:=BARSLAST(BC1!=DRAWNULL)+1;
DBH:=BARSLAST(TC1!=DRAWNULL)+1;
BSP:=IF(BC2>TC2,DBL,DBH)-1;
LRL:=IF(NP>FP,FP+AD/NOD*BSP,FP-AD/NOD*BSP);
AT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND H>LRL,H,LRL);
AT2:=HHV(AT1-LRL,MAX(BC2,TC2));
AT3:=CONST(BARSLAST(AT1-LRL=AT2));
AT4:=CONST(IF(AT3=0,H,REF(H,AT3)));
AT5:=CONST(IF(AT3=0,AT1-LRL,REF(AT1-LRL,AT3)));
ATL:=LRL+AT5;
UT1:=IF(BETWEEN(CURRBARSCOUNT,BC2,TC2) AND L<LRL,L,LRL);
UT2:=HHV(LRL-UT1,MAX(BC2,TC2));
UT3:=CONST(BARSLAST(LRL-UT1=UT2));
UT4:=CONST(IF(UT3=0,H,REF(H,UT3)));
UT5:=CONST(IF(UT3=0,LRL-UT1,REF(LRL-UT1,UT3)));
UTL:=LRL-UT5;
RH:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,ATL,CONST(REF(ATL,MIN(BC2,TC2)-11)));{限制高}
RL:=IF(CURRBARSCOUNT>=MIN(BC2,TC2)-10,UTL,CONST(REF(UTL,MIN(BC2,TC2)-11)));{限制低}
中轨:IF(NP>FP,IF(LRL<=RH,LRL,DRAWNULL),IF(LRL>=RL,LRL,DRAWNULL)),COLORRED,LINETHICK2;
上轨:IF(NP>FP,IF(ATL<=RH,ATL,DRAWNULL),IF(ATL>=RL,ATL,DRAWNULL)),COLORBLUE,LINETHICK2;
下轨:IF(NP>FP,IF(UTL<=RH,UTL,DRAWNULL),IF(UTL>=RL,UTL,DRAWNULL)),COLORMAGENTA ,LINETHICK2;
STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,50,0),COLORWHITE;
DRAWTEXT(ISLASTBAR,HHV(C,5)*0.95,'止损价位'),COLORWHITE;
VAR11:=ZIG(3,13);
STICKLINE((REF(VAR11,2) < REF(VAR11,1)) AND (VAR11 < REF(VAR11,1)),CLOSE,OPEN,5,0),COLOR00FF7F;
AAA:=CONST(HHV(H*0.85,90));
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,10),1)),L*0.99,'买'),COLORRED;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),H*1.01,'卖'),COLORGREEN;
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLORCYAN;
DRAWTEXT_FIX(1,0.06,0,0,HYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLORCYAN;
DRAWTEXT_FIX(1,0.20,0,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(C>0,0.0,0.05,0,STRCAT('业绩预报:',EXTERNSTR(0,3))),COLORWHITE;
DRAWTEXT_FIX(C>0,0.00,0.10,0,STRCAT('主题投资:',EXTERNSTR(0,7))),COLORRED;
DRAWTEXT_FIX(1,0.00,0.05,0,'主营业务:'),COLORRED;
DRAWTEXT_FIX(1,0.06,0.05,0,EXTERNSTR(0,3)),COLORWHITE;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.8,0,HYBLOCK),COLOR00FF00;
DRAWTEXT_FIX(ISLASTBAR,0.75,0.8,0,DYBLOCK),COLOR00FFFF;
DRAWTEXT_FIX(ISLASTBAR,0.65,0.9,0,GNBLOCK),COLORYELLOW;
{以上为显示所属板块,地域,概念等};
止损:0.965*REF(H,1),LINETHICK0;
止盈:1.06*REF(H,1),LINETHICK0; |