强弱分界:EMA(COST(34),10){,PRECISION2,LINEDOT},COLORRED,DOTLINE;
分界:EMA(COST(55),10){,PRECISION2,LINEDOT},COLORGREEN,DOTLINE;
DRAWBAND(强弱分界,RGB(125,0,125),分界,RGB(125,125,20));
{所属板块}
DRAWTEXT_FIX(1,0.15,0,0,'所属行业:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.20,0,0,HYBLOCK),COLOR0099FF;
DRAWTEXT_FIX(1,0.15,0.05,0,'所属地区:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.20,0.05,0,DYBLOCK),COLOR0099FF;
DRAWTEXT_FIX(1,0.15,0.1,0,'所属概念:'),COLORYELLOW;
DRAWTEXT_FIX(1,0.20,0.1,0,GNBLOCK),COLOR0099FF;
{乖离系数}
RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
KK1:=SMA(RSV,10,1);
DD1:=SMA(KK1,5,1);
KKK:=INTPART(KK1);
DD0:=INTPART(DD1);
TFXXS:=KKK+DD0;
TGLD:=MOD(TFXXS,10);
TGLXS:=(TFXXS-REF(TFXXS,1))*10;
TYCFX:=TFXXS+TGLXS;
乖离系数:TGLXS,COLORYELLOW,NODRAW;
{四色主图2}
STICKLINE(C>=O,L,H,0,0),COLOR0000CC;
STICKLINE(C
STICKLINE(C>=O,C,O,2.8,0),COLOR0000E5;
A:=EMA(C,8)COLORBLUE,LINETHICK3;
B:=AHY:=IF(B-1,A,DRAWNULL)COLORRED,LINETHICK3;
AA:=EMA(C,3)>EMA(C,21),NODRAW,COLORRED;
BB:=EMA(C,3)
CC1:=EMA(C,3)
STICKLINE(AA,CLOSE,OPEN,2.4,0),COLOR0000AA;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLOR0000BB;
STICKLINE(AA,CLOSE,OPEN,2.0,0),COLOR0000CC;
STICKLINE(AA,CLOSE,OPEN,1.6,0),COLOR0000DD;
STICKLINE(AA,CLOSE,OPEN,1.2,0),COLOR0000EE;
STICKLINE(AA,CLOSE,OPEN,0.6,0),COLOR0000FF;
STICKLINE(AA,CLOSE,OPEN,0.2,0),COLOR0000FF;
STICKLINE(BB,H,L,0,1),COLORGREEN;{绿色}
STICKLINE(BB,C,O,2.2,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,2.0,0),COLORAA00AA;
STICKLINE(BB AND CC,C,O,1.5,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),COLORYELLOW;{黄色}
STICKLINE(AA AND CC1,C,O,2.2,0),COLORYELLOW;
STICKLINE(AA AND CC1,C,O,1.9,0),COLORYELLOW;
STICKLINE(AA AND CC1,C,O,1.1,0),COLORYELLOW;
STICKLINE(AA AND CC1,C,O,0.3,0),COLORYELLOW;
{短买}
JRH:=HHV(C,2);
JRL:=LLV(C,2);
YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;
VAR1:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));
VAR2:=(REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR3:=(REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR4:=(REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR5:=(REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR6:=(REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR7:=(REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR8:=(REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR9:=(REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARA:=(REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARB:=(REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARC:=(REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VARD:=(CLOSEVARE:=(REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VARF:=(REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2));
VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2));
VAR19:=((REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1)) AND VAR1);
VAR1A:=((REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1)) AND VARD);
短买:VAR19,COLORYELLOW,NODRAW;
CO:=(C-O);
STICKLINE(短买,O,O+CO/3,2.2,0),COLOR008888; {黄金柱}
STICKLINE(短买,O,O+CO/3,1.6,0),COLOR00CCCC;
STICKLINE(短买,O,O+CO/3,0.4,0),COLOR00EEEE;
{DRAWTEXT(短买,REF(CLOSE,1)-0.2,'B'),COLORYELLOW;
DRAWTEXT(VAR1A,REF(CLOSE,1)+0.1,'S'),COLORYELLOW;}
VAR326:=IF(CLOSE>REF(CLOSE,1),89,0);
VAR327:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0);
{STICKLINE(VAR327>90,L*0.96,L*0.95,3,0),COLORYELLOW;}
DRAWTEXT(VAR327>90,LOW*0.99,'追'),COLORRED;
{变色线}
{JL:EMA(C,18),COLORMAGENTA,LINETHICK2;
红界:IF(JL>REF(JL,1),JL,DRAWNULL),COLORRED,LINETHICK2;
黄界:IF(JL{买进条件:STICKLINE(CROSS(JL,REF(JL,1)),OPEN,CLOSE,2.5,0),COLORFF00FF;
DRAWICON(CROSS(JL,REF(JL,1)),L*0.98,1);
DRAWICON(CROSS(JL,REF(JL,1)),L*0.95,7);}
AAC:=BARSCOUNT(C);
AHC:=HHV(H,200);
ALC:=LLV(L,200);
AC0:=(AHC-ALC)/40;
BC1:=L-AC0;
变盘:=(AAC+0)/34=FLOOR((AAC+0)/34),NODRAW,COLORMAGENTA;
STICKLINE((AAC+0)/34=FLOOR((AAC+0)/34),BC1,BC1-1.5*AC0,2.6,0),COLOR0089FF;
DRAWTEXT((AAC+0)/34=FLOOR((AAC+0)/34),BC1-1*AC0,'变盘'),COLOR0089FF;
{妖股}
AA_1:=EMA(CLOSE,13)-EMA(CLOSE,55);
AA_2:=EMA(0.618*REF(AA_1,1)+0.382*AA_1,3);
A_1:=REF(CLOSE,1);
A_2:=EMA(HHV(HIGH,1),8);
A_3:=EMA(CLOSE,8);
A_4:=A_3A_6:=SMA(MAX(CLOSE-A_1,0),2,1)/SMA(ABS(CLOSE-A_1),2,1)*100;
A_7:=45;
A_8:=20;
A_9:=A_6A_7;
A_10:=A_6A_8;
XG:=(COUNT(A_5=1,4)=3 AND A_5=0 AND OPEN
DRAWICON(XG,L,7),;
STICKLINE(XG,O,O+(C-O)/2,0.4,0),COLOR00D8FF,LINETHICK2;
STICKLINE(XG,O+(C-O)/2,C,0.4,0),COLORRED,LINETHICK2;
MA8:=MA(CLOSE,8),NODRAW,COLORLIMAGENTA;
MA13:=MA(CLOSE,13),COLORLIMAGENTA;
MA21:=MA(CLOSE,21),NODRAW,COLORMAGENTA;
MA34:=MA(CLOSE,34),NODRAW,COLORRED;
MA55:=MA(CLOSE,55),NODRAW;
STICKLINE(C/REF(C,1)>=1.096 AND H=C,O,C,0.4,0),COLORYELLOW,LINETHICK2;
HJ_8:=(REF(CLOSE,3)-CLOSE)/REF(CLOSE,3)*100>5;
HJ_9:=FILTER(HJ_8,10);
HJ_10:=BARSLAST(HJ_9);
HJ_11:=REF(HIGH,HJ_10+2);
HJ_12:=REF(HIGH,HJ_10+1);
HJ_13:=REF(HIGH,HJ_10);
HJ_14:=MAX(HJ_11,HJ_12);
HJ_15:=MAX(HJ_14,HJ_13);
HJ_16:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5;
HJ_17:=HJ_10<150;
HJ_18:=(OPEN-HJ_15)/HJ_15*100<30;
HJ_19:=(CLOSE-LLV(LOW,HJ_10))/LLV(LOW,HJ_10)*100<50;
HJ_20:=(CLOSE-REF(OPEN,5))/REF(OPEN,5)*100<30;
HJ_21:=VOL/MA(VOL,5)<3.5;
HJ_22:=(CLOSE-REF(CLOSE,89))/REF(CLOSE,89)*100<80;
HJ_25:=HJ_16 AND HJ_17 AND HJ_18 AND HJ_19 AND HJ_20 AND HJ_21 AND HJ_22;
暴利:=FILTER(HJ_25,15);
PL1:=(((CLOSE-MA34)/MA34)<0.1);
PL2:=(((CLOSE-MA8)/MA8)<0.3);
偏离率:=(((PL1=1) AND (PL2=1))*0.2);
平台突破:=((((偏离率=0) AND (REF(偏离率,1)=0.2)) AND (REF((COUNT((偏离率=0.2),10)=10),1)=1))*-0.1);
妖股突破:=平台突破=-0.1;
XDF:=(暴利 OR 妖股突破);
VARAB:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);
VARAA:=DYNAINFO(7)/(REF(CLOSE,1))>1.05 AND (DYNAINFO(7)/O>1.05);
FLIGA:=(VOL/REF(VOL,1)>1.2 AND COUNT(CLOSE>OPEN,1)) OR (LOW>REF(HIGH,1) AND COUNT(OPEN>CLOSE,1) AND VOL/REF(VOL,1)>1.2);
妖股:=XDF AND C/REF(C,1)>1.095 AND FLIGA AND VARAA,NODRAW,COLOR00D8FF;
DRAWICON(妖股,LOW*0.98,7);
DRAWTEXT(妖股,LOW+0.28,'妖'),COLORYELLOW;
{加码跟进}
AAA:=(HHV(HIGH,20) - (2 * ATR));
BBB:=CROSS(CLOSE,REF(HHV(HIGH,55),1));
SSS:=CROSS(MIN(MA(CLOSE,13),AAA),CLOSE);
BBBB:=BARSLAST(BBB);
SSSB:=BARSLAST(SSS);
B1:=((BBBB = 0) AND (REF(SSSB,1) < REF(BBBB,1)));
B1B:=BARSLAST(B1);
B2:=((((BBB = 1) AND (B1B < SSSB)) AND (B1B > 0)) AND (COUNT(BB,SSSB) < 3));
B2B:=BARSLAST(B2);
B3:=((((BBB = 1) AND (B2B < B1B)) AND (COUNT(BB,SSSB) < 4)) AND (COUNT(BBB,SSSB) > 2));
DRAWTEXT((B1=1),(LOW*0.98),'跟进'),COLORYELLOW;
跟进:B1=1,COLORMAGENTA,NODRAW;
DRAWTEXT((B2=1),(LOW*0.98),'加码'),COLORFFAAFF;
加码:B1=1,COLORRED,NODRAW;
{中短线决策}
{红线区持股,绿线区持币}
N1:=IF(BARSCOUNT(C)>=8,8,BARSCOUNT(C));
AMOV1:=VOL*(C+L+H)/3;
短线:=SUM(AMOV1,N1)/SUM(VOL,N1),COLORRED,NODRAW;
{筹码平均成本线}
均价线:=IF(CURRBARSCOUNT<13,CONST(COST(55)),DRAWNULL),COLORWHITE,DOTLINE;
STICKLINE(均价线,均价线,均价线,2,1),COLORWHITE;
DRAWTEXT(CURRBARSCOUNT=1,均价线*0.998,'均价线'),COLORWHITE,LINETHICK2;
CCX:=IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000,NODRAW;
止损线:0.97*CCX,COLORGREEN;
DRAWTEXT(ISLASTBAR,止损线,'止损线'),COLORGREEN;
{操作区间}
N:=120;
KK:=BARSLAST(CURRBARSCOUNT=N);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,KK),0));
RR:=CONST(IF(ISLASTBAR=1,LLV(L,KK),0));
KJ:=GD-RR;
高:=IF(CURRBARSCOUNT<=N,GD,DRAWNULL),COLOR00FFFF,POINTDOT;
压:=IF(CURRBARSCOUNT<=N,GD-KJ*0.191,DRAWNULL),COLORFF00FF,NODRAW;
平衡:=IF(CURRBARSCOUNT<=N,RR+KJ/2,DRAWNULL),COLOR00FFFF,NODRAW;
支撑:=IF(CURRBARSCOUNT<=N,RR+KJ*0.191,DRAWNULL),COLOR00FF00,NODRAW;
低:=IF(CURRBARSCOUNT<=N,RR,DRAWNULL),COLOR00FF00,POINTDOT;
天:=BARSLAST(L=RR),COLOR00FFFF,NODRAW;
STICKLINE(CURRBARSCOUNT<=N,高,高,3,-1),COLOR00FFFF;
STICKLINE(CURRBARSCOUNT<=N,平衡,平衡,3,-1),COLORMAGENTA;
STICKLINE(CURRBARSCOUNT<=N,压,压,3,-1),COLORRED;
STICKLINE(CURRBARSCOUNT<=N,支撑,支撑,3,-1),COLORWHITE;
STICKLINE(CURRBARSCOUNT<=N,低,低,3,-1),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,压,'0.809'),COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=1,平衡,'0.500'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=1,支撑,'0.191'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/2+9,GD-KJ/12,'★强势区域--急拉减仓!'),COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=N/2+9,GD-KJ/3,'●震荡整理--寻机低吸!'),COLORMAGENTA;
DRAWTEXT(CURRBARSCOUNT=N/2+9,RR+KJ/3,'◆反弹中轨--逢高休息!'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/2+9,RR+KJ/10,'■弱势区域--暂不参与!'),COLORFFFF00;
V5:=MA(V,5);
V10:=MA(V,10);
D1:=V>REF(HHV(V,2),1) AND RANGE(V5,V10,V) AND UPNDAY(V5,2) AND UPNDAY(V10,2);
D2:=H>REF(HHV(H,2),1);
KMAX:=MAX(C,O);
D3:=KMAX>REF(HHV(KMAX,2),1);
DA:=D1 AND D2 AND D3;
P1:=BARSLAST(DA=1);
P2:=REF(REF(H,1),P1);
DB:=IF(DA,0,IF(C
NOTEXT:LJ,COLORWHITE,LINETHICK2;
DRAWICON(IF(C>LJ,IF(REF(KMAX
{龙头出局}
XA_1:=IF(DATETODAY(DATE)<10581231,1,1);
XA_2:=REF(CLOSE,1);
XA_3:=IF(DATE<2942.459961*500,1,1);
XA_4:=SMA(MAX(CLOSE-XA_2,0),6,1)/SMA(ABS(CLOSE-XA_2),6,1)*100;
XA_5:=SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
XA_6:=SMA(MAX(CLOSE-XA_2,0),7,1)/SMA(ABS(CLOSE-XA_2),7,1)*100;
XA_7:=SMA(MAX(CLOSE-XA_2,0),13,1)/SMA(ABS(CLOSE-XA_2),13,1)*100;
XA_8:=BARSCOUNT(CLOSE);
XA_9:=(XA_6<20 AND XA_7<25 AND XA_8>50 AND XA_5<70)*30;
XA_10:=EMA((CLOSE-MA(CLOSE,7)*XA_1)/MA(CLOSE,13)*480,2)*5*XA_3;
XA_11:=EMA((CLOSE-MA(CLOSE,13)*XA_1)/MA(CLOSE,21)*480,7)*5*XA_3;
XA_12:=CROSS(XA_11,XA_10) AND XA_10>200;
龙头出局:=XA_12=1,COLORGREEN,NODRAW;
DRAWICON(龙头出局,H+0.2,43);
STICKLINE(龙头出局,O,C,0.4,0),COLORGREEN;
{首板涨停预警}
首板预警:=REF(C
DRAWICON(首板预警,L*0.98,42);
{量化主图}
XB_4:=FINDHIGHBARS(VOL,1,5,1);
XB_5:=FINDHIGHBARS(VOL,XB_4+5,5,1);
XB_6:=FINDHIGHBARS(VOL,10,100,1);
XB_7:=FINDLOWBARS(VOL,5,100,1);
XB_8:=CURRBARSCOUNT;
XB_9:=0;
XB_10:=CONST(XB_4);
XB_11:=CONST(XB_5);
XB_12:=CONST(XB_6);
XB_13:=CONST(XB_7);
XB_14:=CONST(REF(IF(CLOSE>OPEN,CLOSE,OPEN),XB_10+XB_9));
XB_15:=CONST(REF(IF(CLOSE>OPEN,OPEN,CLOSE),XB_10+XB_9));
XB_16:=CONST(REF(IF(CLOSE>OPEN,CLOSE,OPEN),XB_11+XB_9));
XB_17:=CONST(REF(IF(CLOSE>OPEN,OPEN,CLOSE),XB_11+XB_9));
XB_18:=CONST(REF(IF(CLOSE>OPEN,CLOSE,OPEN),XB_12));
XB_19:=CONST(REF(IF(CLOSE>OPEN,OPEN,CLOSE),XB_13));
DRAWICON(CURRBARSCOUNT=XB_13+1,LOW*0.98,34),LINETHICK9;