P1:=5;
P2:=10;
P3:=30;
P4:=60;
P5:=120;
P6:=250;
DRAWGBK(O>0,RGB(33,47,58),RGB(0,0,0),0,'02',0),LINETHICK2;
{波峰}
TY:=H;
A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C1:=BACKSET(B1,10+1);
HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10); C002:=BACKSET(B2,10+1);
LD:=FILTER(C002,10);
波峰:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT;
STICKLINE(H,波峰,波峰,8,0),COLORYELLOW,LINETHICK2;
{跳空}
STICKLINE(REF(L,1)>H,H,REF(L,1),5,0),COLORGRAY;
STICKLINE(REF(H,1)<L,L,REF(H,1),5,0),COLORGRAY;
{涨停}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
{跌停}
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
C3:=REF(C,1);
涨停0:=IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0),COLOR2DFFFF;
STICKLINE(涨停0,OPEN,CLOSE,3,0),COLOR00AAAA;
STICKLINE(涨停0,OPEN,CLOSE,2.5,0),COLOR00CACA;
STICKLINE(涨停0,OPEN,CLOSE,2,0),COLOR00E3E3;
STICKLINE(涨停0,OPEN,CLOSE,1.5,0),COLOR02FFFF;
STICKLINE(涨停0,OPEN,CLOSE,1,0),COLOR2DFFFF;
跌停0:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0),COLOR33FF33;
STICKLINE(跌停0,OPEN,CLOSE,3,0),COLOR00B700;
STICKLINE(跌停0,OPEN,CLOSE,2.5,0),COLOR00D200;
STICKLINE(跌停0,OPEN,CLOSE,2,0),COLOR00EA00;
STICKLINE(跌停0,OPEN,CLOSE,1.5,0),COLOR0FFF0F;
STICKLINE(跌停0,OPEN,CLOSE,1,0),COLOR33FF33;
获利比例:WINNER(C)*100,NODRAW;
DRAWTEXT_FIX(ISLASTBAR,0.5,1.5,0,STRCAT('获利比例:',CON2STR(获利比例,2)));
expma10:EXPMA(CLOSE,10),LINETHICK4,COLOR00FFFF;
EXPMA60:EXPMA(CLOSE,60),COLOR0033FF,LINETHICK4;
DRAWICON(crOSS(EXPMA10,EXPMA60),EXPMA10,5);
K:=kdj.K;
J:=kdJ.J;
ENTERLONG:CROSS(J,K) ;
ENTERSHORT:CROSS(K,J) ;
DRAWTEXT_FIX(1,0.00,0.00,0,'[主题投资]:')COLOR0000FF;
DRAWTEXT_FIX(1,0.05,0.00,0,EXTERNSTR(0,1))COLOR0000FF;
均价线0:=AMOUNT/V/100,POINTDOT;
C02:=REF(C,1);
涨停:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
DT00:=C<REF(C,1)*0.901 AND C>REF(C,1)*0.898;
STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;
STICKLINE(涨停,H,L,0,0),COLORYELLOW;
STICKLINE(DT00,OPEN,CLOSE,4,0),COLORWHITE;
STICKLINE(DT00,OPEN,CLOSE,3,0),COLORGREEN;
STICKLINE(DT00,C,O,4,0),COLORGREEN;
卖出线:=98;
阶段卖:=96;
均价线:=AMOUNT/V/100,POINTDOT;
C2:=REF(C,1);
涨停1:=IF(REF(C,1)*1.1-C<0.01 ,1,0);
DT:=C<REF(C,1)*0.901 AND C>REF(C,1)*0.898;
STICKLINE(涨停1,OPEN,CLOSE,4,0),COLORRED;
STICKLINE(涨停1,OPEN,CLOSE,3,0),COLORYELLOW;
STICKLINE(涨停1,H,L,0,0),COLORYELLOW;
趋势:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA
(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
底部:=10;
买入警戒:STICKLINE(趋势<=10,HIGH,LOW,0.5,0),LINETHICK2,COLOR00FF00;
STICKLINE(趋势<=10,OPEN,CLOSE,5,1),LINETHICK2,COLOR00FF00;
卖出警戒:STICKLINE(趋势>=阶段卖,HIGH,LOW,0.5,0),COLORYELLOW;
STICKLINE(趋势>=阶段卖,OPEN,CLOSE,6,1),LINETHICK2,COLORYELLOW;
DRAWTEXT((CROSS(趋势,底部)),(LOW * 0.98),'↖买入'),COLORFF00FF;
DRAWICON((CROSS(趋势,底部)),L-0.04,1);
PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),
IF((LLV(L,3)>=REF(C,3) AND REF(C,3)>REF(O,3)),REF(C,3),
IF(LLV(L,3)>=REF(O,3) AND REF(C,3)>REF(O,3),REF(O,3),REF(L,3))));
{画量柱标识:}
{1.画倍量黄金柱标识}
倍量黄金柱:=DRAWICON((LLV(L,3)>REF(L,3) OR LLV(L,3)=REF(L,3)) AND HHV(V,3)<REF(V,3) AND
REF(C,3)>REF(O,3) AND REF(V,3)>=2*REF(V,4),H+0.2,17);
{2.画梯量黄金柱标识}
梯量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND
REF(V,5)>REF(V,6) AND REF(V,4)>REF(V,5) AND REF(V,3)>REF(V,4),H,17);
{3.画平量黄金柱标识}
平量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND
REF(C,3)>REF(O,3) AND Abs(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);
倍量:=DRAWICON((vol>REF(V,1)*2.0 OR VOL=REF(V,1)*2.0) AND C>REF(C,1),H+0.2,26);
STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW;
倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,28,0),COLORMAGENTA,LINETHICK5;
DRAWICON(倍量黄金柱,PHD*1.008,12);
HJZ:=(3*C+H+L+O)/6;
HJZ2:=(8*HJZ+7*REF(HJZ,1)+6*REF(HJZ,2)+5*REF(HJZ,3)+4*REF(HJZ,4)+3*REF(HJZ,5)+2*REF(HJZ,6)+REF(HJZ,8))/36;
HJZ3:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>HJZ2 AND C>O;
黄金柱:FILTER(HJZ3,5),STICK,COLORRED,LINETHICK4,NODRAW;
STICKLINE(黄金柱,O,C,3.3,0),COLORRED;
STICKLINE(黄金柱,H,L,0.1,0),COLORRED;
DRAWTEXT(黄金柱,H*0.98,'←黄金柱'),COLORYELLOW;
XG:=SUMBARS(FILTER(黄金柱,2),1);
STICKLINE(XG,REF(C,XG-1),REF(C,XG-1),10,0),COLORGREEN;
XG1:=SUMBARS(FILTER(黄金柱,2),1);
STICKLINE(XG1,REF(L,XG1-1),REF(L,XG1-1),10,0),COLORAA00FF;
EMA13:=EMA(C,13),COLOR0000FF,LINETHICK2;
IF(C>EMA13,EMA13,DRAWNULL),COLORRED,LINETHICK2;
IF(C<EMA13,EMA13,DRAWNULL),COLORGREEN,LINETHICK2;
X:=21;
TTY:=H;
AAT:=REF(TTY,X)=HHV(TTY,2*X+1);
BBT:=FILTER(AAT,X);
CCT:=BACKSET(BBT,X+1);
HD10T:=FILTER(CCT,X);
AA1T:=REF(TTY,X)=LLV(TTY,2*X+1);
BB1T:=FILTER(AA1T,X);
CC1T:=BACKSET(BB1T,X+1);
LD10T:=FILTER(CC1T,X);
三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);
三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));
三日价涨A:=C>=REF(C,1);
三日价涨B:=C<REF(C,1);
三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);
TIM:=IF(DATE<1140214,1,0);
缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;
百日低量:=(VOL=LLV(VOL,100))*TIM;
倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;
四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;
四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;
前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND
(REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;
倍量黄金柱1:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
黄金柱1:=倍量黄金柱1 OR 高量黄金柱;
次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次黄金柱:=次倍量黄金柱 OR 次高量黄金柱;
准倍量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前倍量柱 AND ((三日量缩 AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破))
AND 前三引用不成立;
准高量黄金柱:=NOT(黄金柱 OR 次黄金柱) AND 四日前高量柱 AND (三日量缩 AND 三日价涨C) AND 前三引用不成立;
准黄金柱:=准倍量黄金柱 OR 准高量黄金柱;
倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;
将军柱:=倍量将军柱 OR 高量将军柱;
次倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;
次将军柱:=次倍量将军柱 OR 次高量将军柱;
准倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前倍量柱 AND 三日价涨C AND 前三引用不成立;
准高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前高量柱 AND 三日价涨C AND 前三引用不成立;
准将军柱:=准倍量将军柱 OR 准高量将军柱;
BACKSET100:=BACKSET(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱 OR 准将军柱,4);
FILTER100:=FILTER(BACKSET100,3);
BACKSET101:=BACKSET(黄金柱,4);
FILTER101:=FILTER(BACKSET101,3);
BACKSET102:=BACKSET(次黄金柱,4);
FILTER102:=FILTER(BACKSET102,3);
BACKSET103:=BACKSET(准黄金柱,4);
FILTER103:=FILTER(BACKSET103,3);
BACKSET104:=BACKSET(将军柱,4);
FILTER104:=FILTER(BACKSET104,3);
BACKSET105:=BACKSET(次将军柱,4);
FILTER105:=FILTER(BACKSET105,3);
BACKSET106:=BACKSET(准将军柱,4);
FILTER106:=FILTER(BACKSET106,3);
{重绘k线}
DRAWKLINE(H,O,L,C);
{重绘K线 显示大阳\大阴\涨停\跌停\假阴}
{假阴柱}
假阴:=C<O AND C>REF(C,1);
STICKLINE(假阴,O,C,1,0),COLORRED;
{假阳柱}
假阳:=C>O AND C<REF(C,1);
STICKLINE(假阳,O,C,1,0),COLORGREEN;
{涨停}
AAAA:=CLOSE/REF(C,1)>=1.09;
STICKLINE(AAAA,O,C,1,0),COLORYELLOW;
STICKLINE(AAAA,L,H,1,0),COLORYELLOW;
{跌停}
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,1,0),COLORBLUE;
DRAWTEXT(FILTER101,LOW*0.986,'↖黄金柱'),COLORYELLOW;
STICKLINE(FILTER101,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER102,LOW*0.986,'↖次黄'){,COLORFF00FF},COLORYELLOW;
STICKLINE(FILTER102,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER103,LOW*0.986,'↖准黄'),COLORFF00FF{,COLORYELLOW};
STICKLINE(FILTER103,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER104,LOW*0.986,'↖将军柱'),COLORRED;
STICKLINE(FILTER104,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER105,LOW*0.986,'↖次将'),COLORFF00FF{,COLORYELLOW};
STICKLINE(FILTER105,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(FILTER106,LOW*0.986,'↖准将'),COLORFF00FF{,COLORYELLOW};
STICKLINE(FILTER106,OPEN,CLOSE,0.5,0),COLORYELLOW;
立桩量:=VOL=HHV(VOL,40) AND VOL>1.9*REF(VOL,1);
立桩量三日突破:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩
量)=3 AND CLOSE>REF(HIGH,3),1,0)));
立桩量三日不破:=BARSLAST(立桩量)=3 AND REF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));
BACKSET300:=BACKSET(立桩量三日不破,4);
BACKSET301:=BACKSET(立桩量三日突破,4);
立桩量成立:=FILTER(BACKSET300,3) AND BACKSET301 AND 立桩量;
{不会画线可以让显示}
DRAWICON(C<O AND C>REF(C,1),H,6);{假阴真阳}
均价:AMOUNT/VOL/100,NODRAW;
假阴1:=O>C AND 均价>REF(C,1);
DRAWTEXT(假阴1,L-0.2,'↖假阴真阳'),COLORE8E8E8;
STICKLINE(假阴1,O,C,1,0),COLORRED;
{极点精准线: CONST(C),COLORLIRED,LINETHICK2;{现价线};
顶底开关:=0;
点位差:=0;
指定点:=0;
V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);
STICKLINE(V2V,H,L,0,0),COLORYELLOW;
STICKLINE(V2V,O,C,3.1,0),COLOR0033FF;
STICKLINE(V2V,O,C,2.1,0),COLOR0077FF;
STICKLINE(V2V,O,C,1.1,0),COLOR00BBFF;
STICKLINE(V2V,O,C,0.1,0),COLOR00FFFF;
ZT:=C/REF(C,1)>1.097;
ZT数:COUNT(ZT,BARSSINCE(ZT)),NODRAW;
均价1:=AMO/VOL/100;
假阴真阳:=C<O AND C>=REF(MIN(C,O),1) AND 均价>REF(均价,1);
DT0:=假阴真阳;
STICKLINE(DT0,H,L,0,0),COLORFFAA00;
STICKLINE(DT0,O,C,3,0),COLORFF3300;
STICKLINE(DT0,O,C,2,0),COLORFF7700;
STICKLINE(DT0,O,C,1,0),COLORFFAA00;
STICKLINE(DT0,O,C,0.1,0),COLORFFFF00;
YX:=REF(O,BARSLAST(假阴真阳));
假阴实顶:YX,COLORFF7700,NODRAW;
STICKLINE(V,YX,YX,1,0),COLORFF7700;
L0:=点位差/100;
前极点精准线:IF(顶底开关=0,CONST(REF(L,指定点)),CONST(REF(H,指定点))),COLOR178448,LINETHICK3;
Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
A11:=CLOSE<OPEN;
A12:=OPEN-CLOSE;{第一个阴线的实柱长}
B11:=BARSLAST(CLOSE>=OPEN);
B12:=REF(CLOSE,B11)-REF(OPEN,B11);{第一个阳线的实柱长}
C10:=B11<3;
C11:=A12-B12>0;
C12:=VOL<REF(VOL,B11);
C13:=VOL<REF(VOL,B11) AND REF(VOL,1)<REF(VOL,2);
C14:=IF(B11=2,C13,C12);
CC:=C10 AND C11 AND C13;{必须条件}
G11:=VOL<SUM(VOL,5)/5;{好,不坏}
G17:=VOL<(REF(VOL,B11)*1/4+REF(VOL,12)*3/4);{有副作用,禁用}
G21:=VOL<(1/3*SUM(VOL,5)/5+1/3*REF(VOL,B11)+1/3*LLV(VOL,5));{好,不坏}
G22:=10.00>100*SUM(DYNAINFO(37),5)/5;{小测试无副作用}
G23:=10000000*(HIGH-LOW)/VOL;
G24:=10000000*(REF(HIGH,B11)-REF(LOW,B11))/REF(VOL,B11);
G241:=SUM(G24,12)/12;
G25:=G23>G241;
GG:=G11 AND G21 AND G22 AND G25;{重要的限制条件}
F11:=CC AND GG;