BBI:(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,POINTDOT,COLORFFFFFF;
BBI2:BBI+3*STD(BBI,10),COLOR0000AA,POINTDOT;
BBI3:BBI-3*STD(BBI,10),COLOR00FF00,POINTDOT;
XX2:=EMA(EMA((CLOSE+LOW+HIGH)/3,3),23);
XX3:=REF(XX2,1);
PARTLINE(XX2,XX2 XX3,RGB(255,0,0),XX2 XX3,RGB(0,255,0)),LINETHICK2;
B1:=MA(CLOSE,1);
B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1) ;
SMA2:=MA(B2,3) ;
FILLRGN(b2,sma2,b2 sma2,RGB(255,0,0),b2 sma2,RGB(0,255,0));
VAR9Q:=CLOSE=HHV(CLOSE,4) AND (REF(CLOSE,1) =REF(CLOSE,2) OR REF(CLOSE,1) =REF(CLOSE,3)) OR REF(CLOSE,1)=HHV(CLOSE,4) AND CLOSE =REF(CLOSE,2) OR REF(CLOSE,2)=HHV(CLOSE,4) AND REF(CLOSE,3)=LLV(CLOSE,4) AND CLOSE =REF(CLOSE,1) OR REF(CLOSE,3)=HHV(CLOSE,4) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
红持:VAR9Q,LINETHICK0,color0000FF;
VARAQ:=CLOSE=HHV(CLOSE,4) AND REF(CLOSE,1)=LLV(CLOSE,4);
粉变:VARAQ,LINETHICK0,colorFF99FF;
VARBQ:=CLOSE=LLV(CLOSE,4) AND (REF(CLOSE,1) REF(CLOSE,2) OR REF(CLOSE,1) REF(CLOSE,3)) OR REF(CLOSE,1)=LLV(CLOSE,4) AND CLOSE REF(CLOSE,2) OR REF(CLOSE,2)=LLV(CLOSE,4) AND REF(CLOSE,1) HHV(CLOSE,4) AND CLOSE REF(CLOSE,1) OR REF(CLOSE,3)=LLV(CLOSE,4) AND CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2);
灰跌:VARBQ,LINETHICK0,color888888;
VARCQ:=REF(CLOSE,1)=LLV(CLOSE,4) AND CLOSE =REF(CLOSE,2) OR REF(CLOSE,2)=LLV(CLOSE,4) AND REF(CLOSE,1) =REF(CLOSE,3) AND REF(CLOSE,2) REF(CLOSE,4) AND CLOSE =REF(CLOSE,1);
绿买:VARCQ,LINETHICK0,color00FF00;
VARDQ:=REF(CLOSE,1)=HHV(CLOSE,4) AND CLOSE REF(CLOSE,2) OR (REF(CLOSE,2)=HHV(CLOSE,4) AND REF(CLOSE,1) REF(CLOSE,3) OR REF(CLOSE,3)=HHV(CLOSE,4) AND REF(CLOSE,1) REF(CLOSE,2)) AND REF(CLOSE,2) =REF(CLOSE,4) AND CLOSE REF(CLOSE,1);
蓝抛:VARDQ,LINETHICK0,colorFF9900;
STICKLINE(CLOSE OPEN,OPEN,LOW,0.5,0),color0000FF;
STICKLINE(CLOSE OPEN,CLOSE,HIGH,0.5,0),color0000FF;
STICKLINE(OPEN =CLOSE,CLOSE,LOW,0.5,0),color00FF00;
STICKLINE(OPEN =CLOSE,OPEN,HIGH,0.5,0),color00FF00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,8,0),colorFF7700;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,6,0),colorFF9900;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,5,0),colorFFBB00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,4,0),colorFFCC00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,3,0),colorFFDD00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,2,0),colorFFEE00;
STICKLINE(OPEN =CLOSE,CLOSE,OPEN,1,0),colorFFFF00;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,8,0),color000055;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,6,0),color000066;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,5,0),color000077;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,4,0),color000099;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,3,0),color0000BB;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,2,0),color0000DD;
STICKLINE(CLOSE OPEN,CLOSE,OPEN,1,0),color0000FF;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,8,0),color000077;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,6,0),color000088;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,5,0),color0000AA;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,4,0),color0000CC;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,2,0),color0000FF;
STICKLINE(VAR9Q,CLOSE,(OPEN+CLOSE)/2,0,0),colorFFFFFF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,8,0),colorFF11FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,6,0),colorFF33FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,5,0),colorFF55FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,4,0),colorFF77FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,3,0),colorFF99FF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,2,0),colorFFBBFF;
STICKLINE(VARAQ,CLOSE,(OPEN+CLOSE)/2,1,0),colorFFDDFF;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,8,0),color333333;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,6,0),color555555;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,5,0),color777777;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,4,0),color999999;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,3,0),colorBBBBBB;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,2,0),colorDDDDDD;
STICKLINE(VARBQ,CLOSE,(OPEN+CLOSE)/2,1,0),colorFFFFFF;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,8,0),color003300;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,6,0),color005500;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,5,0),color007700;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,4,0),color009900;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,3,0),color00BB00;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,2,0),color00DD00;
STICKLINE(VARCQ,OPEN,(OPEN+CLOSE)/2,1,0),color00FF00;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,8,0),colorFF1100;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,6,0),colorFF3300;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,5,0),colorFF5500;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,4,0),colorFF7700;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,3,0),colorFF9900;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,2,0),colorFFBB00;
STICKLINE(VARDQ,OPEN,(OPEN+CLOSE)/2,1,0),colorFFDD00;
wN:=3;{原码 N:=3;}
wA1:=REF(H,wN)=HHV(H,2*wN+1); wB1:=FILTER(wA1,wN); wC1:=BACKSET(wB1,wN+1); wD1:=FILTER(wC1,wN);{高点}
wA2:=REF(L,wN)=LLV(L,2*wN+1); wB2:=FILTER(wA2,wN); wC2:=BACKSET(wB2,wN+1); wD2:=FILTER(wC2,wN);{低点}
wE1:=(REF(LLV(L,2*wN),1)+REF(HHV(H,2*wN),1))/2; wE2:=(H+L)/2;{高低点出现在同一K线上时可作取舍}
wH1:=(wD1 AND NOT(wD2 AND wE1 =wE2)) OR DISPSTATUS=2 OR BARSCOUNT(C)=1;
wL1:=(wD2 AND NOT(wD1 AND wE1 wE2)); wH2:=wD1 AND NOT(wD2 AND wE1 =wE2);
wX1:=REF(BARSLAST(wH1),1)+1; wF1:=BACKSET(wH1 AND COUNT(wL1,wX1) 0,LLVBARS(IF(wL1,L,10000),wX1));
wG1:=wF1 REF(wF1,1); wI1:=BACKSET(wG1,2); wLD:=wI1 REF(wI1,1);{过滤后低点}
wL2:=wLD OR DISPSTATUS=2 OR BARSCOUNT(C)=1;
wX2:=REF(BARSLAST(wL2),1)+1; wF2:=BACKSET(wL2 AND COUNT(wH2,wX2) 0,HHVBARS(IF(wH2,H,0),wX2));
wG2:=wF2 REF(wF2,1); wI2:=BACKSET(wG2,2); wHD:=wI2 REF(wI2,1);{过滤后高点}
wR1:=BACKSET(DISPSTATUS=2,BARSLAST(wHD)+1); wS1:=wR1 REF(wR1,1); {前一高}
wT1:=BACKSET(DISPSTATUS=2,BARSLAST(wLD)+1); wU1:=wT1 REF(wT1,1); {前一低}
wR2:=BACKSET(wS1,REF(BARSLAST(wHD),1)+2); wS2:=wR2 REF(wR2,1); {前二高}
wT2:=BACKSET(wU1,REF(BARSLAST(wLD),1)+2); wU2:=wT2 REF(wT2,1); {前二低}
wT3:=BACKSET(wU2,REF(BARSLAST(wLD),1)+2); wU3:=wT3 REF(wT3,1); {前三低}
wT4:=BACKSET(wU3,REF(BARSLAST(wLD),1)+2); wU4:=wT4 REF(wT4,1); {前四低}
wR3:=BACKSET(wS2,REF(BARSLAST(wHD),1)+2); wS3:=wR3 REF(wR3,1); {前三高}
wR4:=BACKSET(wS3,REF(BARSLAST(wHD),1)+2); wS4:=wR4 REF(wR4,1); {前四高}
DRAWLINE(K=2 AND wS2,H,K=2 AND wS1,H,1),Color008888; {★压力1:}
DRAWLINE(K=2 AND wU2,L,K=2 AND wU1,L,1),POINTDOT,Color008888;{★支撑1:}
DRAWLINE(K=2 AND wS3,H,K=2 AND wS2,H,1),Color888000; {★压力2:}
DRAWLINE(K=2 AND wU3,L,K=2 AND wU2,L,1),POINTDOT,Color888000;{★支撑2:}
DRAWLINE(K=2 AND wS4,H,K=2 AND wS3,H,1),Color0000CC;{★压力3:}
DRAWLINE(K=2 AND wU4,L,K=2 AND wU3,L,1),POINTDOT,Color0000CC;{★支撑3:};
底:=SUM(MA(CLOSE,10),9)/11.114;
DRAWTEXT(CROSS(LOW,底) AND REF(底,1) REF(HIGH,1) OR CROSS(HIGH,底),0.85*CLOSE,'---铁底'),color00FF00;
X1:=(3*CLOSE+HIGH+LOW+OPEN)/6;
X2:=EMA(X1,10);
X3:=REF(X2,1);
X4:=(REF(HIGH,1)+REF(LOW,1))/2;
X5:=MA(CLOSE,21)+2*STD(CLOSE,21);
X6:=REF(CLOSE,1);
X7:=(SMA(MAX(CLOSE-X6,0),7,1))/(SMA(ABS(CLOSE-X6),7,1))*100;
X8:=CROSS(79,X7);
X9:=FILTER(X8,4);
WZ1:=POW(MA(CLOSE,5),2)+MA(CLOSE,5);
WZ2:=POW(MA(LOW,5),2)+MA(LOW,5);
WZ3:=POW(MA(HIGH,5),2)+MA(HIGH,5);
WZ4:=(WZ1-LLV(WZ2,9))/(HHV(WZ3,9)-LLV(WZ2,9))*150+65;
DK:=SMA(WZ4,3,1)*1.5;
DD:=SMA(DK,3,1);
DJ:=3*DK-2*DD;
WZ5:=EMA(CLOSE,12)-EMA(CLOSE,26);
WZ6:=EMA(WZ5,9);
WZ7:=2*(WZ5-WZ6);
WZ8:=REF(WZ7,1);
WZ9:=CROSS(WZ8,WZ7) AND WZ8
VAR1T:=EMA(CLOSE,8);
VAR2T:=EMA(VAR1T,20);
VAR3T:=CROSS(VAR1T,VAR2T);
VAR4T:=VAR1T MA(CLOSE,120);
VAR5T:=(HHV(HIGH,36)-CLOSE)/(HHV(HIGH,36)-LLV(LOW,36))*100;
VAR6T:=SMA(VAR5T,5,1);
VAR7T:=SMA(VAR6T,8,1);
VAR8T:=CROSS(VAR6T,VAR7T) AND VAR7T
VAR9T:=CLOSE LLV(CLOSE,60)+0.3*LLV(CLOSE,60) AND VAR8T;
VARA:=IF(CLOSE 1000,VAR8T,VAR9T);
起步:=VAR3T AND VAR4T;
逃遁:=VARA;
XL1:=EMA(CLOSE,10)/100;
XL2:=MA((XL1-REF(XL1,10))/REF(XL1,10),3)*100;
XL3:=MA(XL2,3);
XL4:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1);
DRAWTEXT(IF(CROSS(3*XL4-2*SMA(XL4,3,1),8),87,0) AND X2 X3,LOW-0.1,' 反弹'),color0000FF;
DRAWTEXT(IF(CROSS((VAR1T-LLV(VAR1T,4))/(HHV(VAR1T,4)-LLV(VAR1T,4))*4*25,87.5) AND VAR1T 40,87,0) AND X2 X3,LOW-0.2,' 短买'),color0000aa;
DRAWTEXT(IF(CROSS(2*(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2+HIGH+LOW)/4,26)-(EMA(EMA((CLOSE*2+HIGH+LOW)/4,12)-EMA((CLOSE*2+HIGH+LOW)/4,26),2)))*5.8,0.47),LOW,0) AND X2 X3,LOW-0.4,' 加仓'),colorFF5ED8;
DRAWTEXT(CROSS(X4,X5),HIGH*1.01,' 减'),colorB4FF00;
DRAWTEXT(FILTER((WZ9 AND DJ 250) OR X9 ,5),HIGH*1.02,' 跑'),colorBCFF8B;
STICKLINE(起步 0,HIGH,LOW,0.8,0),color00FFFF;
STICKLINE(起步 0,OPEN,CLOSE,5,0),color00FFFF;
DRAWTEXT(逃遁 0,HIGH*1.04,'● 逃'),color7FFFD6;
X1P:=(C+L+H)/3;
BB13:=ATAN(EMA(X1P,13)-REF(EMA(X1P,13),1))*3.1416*10;
EMA8:=EMA(C,8);
DRAWTEXT(FILTER(BB13 1 AND EMA(X1P,13) REF(EMA(X1P,8),1),10),EMA8,' 45上升'),COLORWHITE;
VAR3aa:=IF((CLOSE REF(CLOSE,1)),88,0);
VAR4aa:=IF(((CLOSE)/(REF(CLOSE,1)) 1.05) AND ((HIGH)/(CLOSE) 1.01) AND (VAR3aa 0),91,0);
DRAWTEXT(FILTER((VAR4aa 90),45),(LOW)*0.97,'★大胆搏 '),Color00FFFF;
L23:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
L24:=(HIGH+LOW+CLOSE)/3;
L25:=(L24-MA(L24,14))/(0.015*AVEDEV(L24,14));
L26:=(L24-MA(L24,70))/(0.015*AVEDEV(L24,70));
L27:=IF(L25 =150 AND L25 200 AND L26 =150 AND L26 200,10,0);
L28:=IF(L25 =-150 AND L25 -200 AND L26 =-150 AND L26 -200,-10,L27);
L29:=100-ABS((CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100);
L30:=IF(L29 90,L29,100);
L31:=IF(L23 0,L23,0);
XL1:=(IF(L28 =200 AND L25 =150,15,IF(L26 =-200 AND L25 =-150,-15,L28)))+60;
XL2:=L31 48 AND XL1 60 AND L30
DRAWTEXT(XL2 AND COUNT(XL2,30)=1,l,'大笔买入'),colorFF00FF;
VAR3td:=100-3*SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);
VAR4td:=100-3*SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,42))/(HHV(HIGH,42)-LLV(LOW,42))*100,20,1),15,1);
VAR2td:=VAR3td REF(VAR4td,1) AND VOL REF(VOL,1) AND CLOSE REF(CLOSE,1);
DRAWTEXT(VAR2td AND COUNT(VAR2td,30)=1,l*0.93,'大资金进场'),COLORFF00FF;
DRAWTEXTREL(408.5,980.5,STKLABEL+STKNAME+' 流通股:'+NUMTOSTRN(FINANCE2(37),0)+'万'),Color1DFFFF;
DRAWTEXTABS(2,4,'市盈率:'+DYNAINFO(39)),Color9DFFFF;
DRAWTEXTABS(110,4,'市净率:'+c/FINANCE2(4)),Color9DFFFF;
DRAWTEXTABS(218,4,'最新收益:'+FINANCE2(3)+'元 '),Color9DFFFF;
DRAWTEXTABS(326,4,'莸利比例:'+WINNER(c )*100),Color9DFFFF;
DRAWTEXTABS(434,4,'主营收入同比增长:'+FINANCE2(11)+'% '),Color9DFFFF;
DRAWTEXTABS(588,4,'净利润同比增长:'+FINANCE2(10)+'% '),Color9DFFFF;
DRAWTEXTABS(2,17,'板块名称:'+BKNAME),Color9DFFFF;
DRAWTEXTABS(688,17,'评级:'+Extrastring('评级')),Color9DFFFF;
{量能饱和}
SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
DRAWTEXTREL(12,5,'量能饱和度:'+NUMTOSTRN(SAT,0)),LINETHICK3,Color8000FF;