P1:=10;
N:=10;
M:=3;
{板块}
所属板块:=STRCAT('【所属板块】',STRCAT(STRCAT(STRCAT('【行业】',HYBLOCK),STRCAT('【地域】',DYBLOCK)),STRCAT('【概念】',GNBLOCK)));
DRAWTEXT_FIX(ISLASTBAR,0,0,0,所属板块),COLORLIRED;
DRAWTEXT_FIX(1,0,0.04,0,FGBLOCK),COLORRED;
{彩色k线}
AA:=EMA(C,3) > EMA(C,21);
BB:=EMA(C,3) < EMA(C,21);
CC:= EMA(C,3) > EMA(C,8);
CC1:=EMA(C,3) < EMA(C,8);
STICKLINE(AA,L,H,0,0),COLOR0088EE;{红色}
STICKLINE(AA,L,H,0,0),COLOR0000AA;
STICKLINE(AA,H,L,0,0),COLOR0000FF;
STICKLINE(AA,C,O,3,0),COLOR000099;
STICKLINE(AA,C,O,2,0),COLOR0000BB;
STICKLINE(AA,C,O,1,0),COLOR0000DD;
STICKLINE(AA,C,O,0.3,0),COLOR0000FF;
STICKLINE(BB,H,L,0,1),COLORGREEN;{绿色}
STICKLINE(BB,C,O,3.2,0),COLOR006600;
STICKLINE(BB,C,O,2.6,0),COLOR008800;
STICKLINE(BB,C,O,1.9,0),COLOR00AA00;
STICKLINE(BB,C,O,1.1,0),COLOR00CC00;
STICKLINE(BB,C,O,0.3,0),COLOR00FF00;
STICKLINE(BB AND CC,H,L,0,1),COLORFF55FF;{粉色}
STICKLINE(BB AND CC,C,O,3.2,0),COLOR880088;
STICKLINE(BB AND CC,C,O,2.6,0),COLORAA00AA;
STICKLINE(BB AND CC,C,O,1.9,0),COLORCC00CC;
STICKLINE(BB AND CC,C,O,1.1,0),COLOREE00EE;
STICKLINE(BB AND CC,C,O,0.3,0),COLORFF44FF;
STICKLINE(AA AND CC1,H,L,0,1),COLORFF8800;{蓝色}
STICKLINE(AA AND CC1,C,O,3.2,0),COLORFF2200;
STICKLINE(AA AND CC1,C,O,2.6,0),COLORFF4400;
STICKLINE(AA AND CC1,C,O,1.9,0),COLORFF6600;
STICKLINE(AA AND CC1,C,O,1.1,0),COLORFF8800;
STICKLINE(AA AND CC1,C,O,0.3,0),COLORFFAA00;
{涨停K线-金色}
ZT:=(C/REF(C,1)-1)*100>9.5;
{STICKLINE(ZT,CLOSE,OPEN,3,0),COLOR0055AA;
STICKLINE(ZT,CLOSE,OPEN,2.8,0),COLOR0066BB;
STICKLINE(ZT,CLOSE,OPEN,2.5,0),COLOR0077CC;
STICKLINE(ZT,CLOSE,OPEN,2.2,0),COLOR0088DD;
STICKLINE(ZT,CLOSE,OPEN,1.7,0),COLOR0099EE;
STICKLINE(ZT,CLOSE,OPEN,1.2,0),COLOR00AAFF;
STICKLINE(ZT,CLOSE,OPEN,0.7,0),COLOR00CCFF;
STICKLINE(ZT,CLOSE,OPEN,0.2,0),COLOR00FFFF;}
STICKLINE(ZT,OPEN,CLOSE,0.5,0),COLORYELLOW;
{跌停}
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,0.5,0),COLORRED;
筹码80:COST(80),NODRAW,COLORYELLOW,LINETHICK2;
筹码90:COST(90),NODRAW,COLORFF00FF,LINETHICK2;
底:COST(0.2),NODRAW,COLOR00FF00, LINETHICK2;
获利比例:WINNER(CLOSE)*100,COLORRED,NODRAW;{可调}
A:=P1+(100-P1)/2;
B:=(100-P1)/2;
CCC:=COST(A);
DD:=COST(B);
筹码集中度:(CCC-DD)/(CCC+DD)*100,COLORYELLOW,NODRAW;
振幅:DYNAINFO(13)*100,NODRAW,COLORWHITE;
K:=1;
箱顶:IF(K=1 ,MA(REF(HHV(C,30),1),2),DRAWNULL)COLORYELLOW;
箱底:IF(K=1 ,MA(REF(LLV(C,30),1),2),DRAWNULL)COLORCYAN;
{3K买卖点}
AAA:=C>REF(HHV(H,2),1);
BBB:=C<REF(LLV(L,2),1);
ENTERLONG:=TFILTER(AAA,BBB,1);
EXITLONG:=TFILTER(AAA,BBB,2);
IF(EXITLONG,HIGH*1.01,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK5;{3K卖点标注}
IF(ENTERLONG,LOW*0.99,DRAWNULL),POINTDOT,COLORRED,LINETHICK5;{3K买点标注}
{7%以上阳线}
实收价:=IF((FRacPART((C * 100)) > 0.46),(CEILING((C * 100)) / 100),(FLOOR((C * 100)) / 100));
柒%阳:=(实收价 >= IF((FRACPART(((REF(实收价,1) * 1.07) * 100)) > 0.46),(CEILING(((REF(实收价,1) * 1.07) * 100)) / 100),(FLOOR(((REF(实收价,1) * 1.07) * 100)) / 100)));
DRAWTEXT(柒%阳,HIGH*1.01,'7%'),COLORYELLOW;
{私募持股线}
DIR:=Abs(CLOSE-REF(CLOSE,22));
VIR:=SUM(ABS(CLOSE-REF(CLOSE,1)),22);
ER:=DIR/VIR;
CS:=ER*(2/3-2/14)+2/14;
CQ:=CS*CS;
私募成本线:EMA(DMA(CLOSE,CQ),2),COLORCYAN,LINETHICK3;
IF(私募成本线>=REF(私募成本线,1),私募成本线,DRAWNULL),COLORMAGENTA,LINETHICK3;
FIL:=STD(私募成本线-REF(私募成本线,1),20);
{虚拟涨停K}
KXZT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500 OR DYNAINFO(7)=0) AND C>=O,REF(CLOSE,1)*1.1,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXZT,MAX(OPEN,CLOSE),-1,-1),COLOR00C0C0;
{虚拟跌停K}
KXDT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500) AND C<O,REF(CLOSE,1)*0.9,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXDT,MIN(OPEN,CLOSE),-1,-1),COLORLIBLUE;
{最长筹码线}
X_36:=COST(1);
X_37:=COST(10);
X_38:=COST(20);
X_39:=COST(30);
X_40:=COST(40);
X_41:=COST(50);
X_42:=COST(60);
X_43:=COST(70);
X_44:=COST(80);
X_45:=COST(90);
X_46:=COST(99);
X_47:=COST(5);
X_48:=COST(15);
X_49:=COST(25);
X_50:=COST(35);
X_51:=COST(45);
X_52:=COST(55);
X_53:=COST(65);
X_54:=COST(75);
X_55:=COST(85);
X_56:=COST(95);
X_57:=X_47-X_36;
X_58:=X_37-X_47;
X_59:=X_48-X_37;
X_60:=X_38-X_48;
X_61:=X_49-X_38;
X_62:=X_39-X_49;
X_63:=X_50-X_39;
X_64:=X_40-X_50;
X_65:=X_51-X_40;
X_66:=X_41-X_51;
X_67:=X_52-X_41;
X_68:=X_42-X_52;
X_69:=X_53-X_42;
X_70:=X_43-X_53;
X_71:=X_54-X_43;
X_72:=X_44-X_54;
X_73:=X_55-X_44;
X_74:=X_45-X_55;
X_75:=X_56-X_45;
X_76:=X_46-X_56;
X_77:=MIN(X_57,MIN(X_58,MIN(X_59,MIN(X_60,MIN(X_61,MIN(X_62,MIN(X_63,MIN(X_64,MIN(X_65,MIN(X_66,MIN(X_67,MIN(X_68,MIN(X_69,MIN(X_70,MIN(X_71,MIN(X_72,MIN(X_73,MIN(X_74,MIN(X_75,X_76)))))))))))))))))));
X_78:=IF(X_57=X_77,(X_47+X_36)/2,IF(X_58=X_77,(X_47+X_37)/2,IF(X_59=X_77,(X_48+X_37)/2,IF(X_60=X_77,(X_48+X_38)/2,IF(X_61=X_77,(X_49+X_38)/2,IF(X_62=X_77,(X_49+X_39)/2,IF(X_63=X_77,(X_50+X_39)/2,IF(X_64=X_77,(X_50+X_40)/2,IF(X_65=X_77,(X_51+X_40)/2,IF(X_66=X_77,(X_51+X_41)/2,IF(X_67=X_77,(X_52+X_41)/2,IF(X_68=X_77,(X_52+X_42)/2,IF(X_69=X_77,(X_53+X_42)/2,IF(X_70=X_77,(X_53+X_43)/2,IF(X_71=X_77,(X_54+X_43)/2,IF(X_72=X_77,(X_54+X_44)/2,IF(X_73=X_77,(X_55+X_44)/2,IF(X_74=X_77,(X_55+X_45)/2,IF(X_75=X_77,(X_56+X_45)/2,(X_56+X_46)/2)))))))))))))))))));
筹码峰线:X_78,NODRAW,COLOR00EEEE;
STICKLINE(ISLASTBAR,筹码峰线,筹码峰线*1.001,20,0),COLORYELLOW;
{柚子抄底}
VAR1:=IF(DATE>=1161001,1,0);CV:=CLOSE;
低吸:=(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4*VAR1;
高潮:=低吸+M*STD(低吸,N)*VAR1;
低谷:=低吸-M*STD(低吸,N)*VAR1;
STICKLINE(C>高潮 AND L<低谷,C,O,3,0)*VAR1,COLORWHITE;
DRAWTEXT(C>高潮 AND L<低谷,LOW*0.98,'注意变盘')*VAR1,COLORYELLOW;
半分位:=((O+C)/2);
昨半分位:=REF(半分位,1);
STICKLINE(CURRBARSCOUNT<=1,昨半分位,昨半分位,12,0),COLORMAGENTA;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.90,0.06,1,'昨半分位:'),LINETHICK5,COLORMAGENTA;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.92,0.06,1,昨半分位);
{极阴次阳}
盘:=CAPITAL/100;
换:=V/盘;
换手率:=BETWEEN(换,6.74,40);
S1:=30;
最高值:=HHV(vol,S1);
KK:=2.19;
量比:=DYNAINFO(17)>0.7;
流通盘:=CAPITAL/1000000<=KK;
去问题股:=COUNT(O=L AND C=L AND L<REF(C,1),30)=0;
股价:=C>=5.20 AND C<13.99;
去创业板:=IF(CODELIKE('300'),0,1);
去停牌:=DYNAINFO(17)>0;
ST:=IF(NAMELIKE('S'),0,1) AND IF(NAMELIKE('*'),0,1);
去ST:=ST AND 去停牌;
极阴:=C/REF(C,1)<0.96;
连阴1:=C/REF(C,1)<0.99 AND REF(C,1)/REF(C,2)<0.985;
连阴2:=C/REF(C,1)<0.985 AND REF(C,1)/REF(C,2)<0.99;
连阴:=连阴1 OR 连阴2;
次阳:=C/REF(C,1)>1.095 AND V/REF(V,1)<3 AND H<>L;
去除:=EXIST(C/REF(C,1)>1.09,60) AND DYNAINFO(8)>0 ;
极阴次阳:REF(极阴,1) AND 次阳 OR REF(连阴,1) AND 次阳 AND 去除 AND 去ST AND O=L AND C>O AND C>REF(H,1);
DRAWTEXT(极阴次阳,LOW*0.98,'极阴次阳'),COLORYELLOW;