CV:=CLOSE;
bbiboll:(MA(CV,3)+MA(CV,6)+MA(CV,12)+MA(CV,24))/4,LINETHICK2;
UPR:BBIBOLL+M*STD(BBIBOLL,N);
DWN:BBIBOLL-M*STD(BBIBOLL,N);
BDGD:=C=HHV(C,13);
GDSJ:=BArslAST(FILTER(crOSS(0.8,BDGD),2))+1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
高点:REF(C,GDSJ),COLORFF00FF,POINTDOT;
突破:CROSS(C,REF(高点,1)),COLOR00FFFF,POINTDOT,NODRAW;
STICKLINE(GDSJ<=6,高点,高点,3,0),COLORFF00FF;
DRAWTEXT(突破,LOW,'★'),COLOR00FFFF;
BDDD:=C=LLV(C,13);
DDSJ:=BARSLAST(FILTER(CROSS(0.8,BDDD),2))+1;
低点:REF(C,DDSJ),COLOR00FF00,POINTDOT;
【量能饱和】:=IF(SAT>1,1,SAT)*100,COLORYELLOW,NODRAW;
{ DRAwrECTREL(100,120,390,160,RGB(0,0,100));
DRAWRECTREL(100,120,90+CONST(【量能饱和】*300/100),160,RGB(250,104,0));}
DRAWTEXT_FIX(1,0.005,0.90,0,STRCAT(STRCAT('【量能饱和】: ',CON2STR(【量能饱和】,1)),' % ')),COLORYELLOW;
涨跌停封单:=DYNAINFO(58)*C*100;
DRAWTEXT_FIX(1,0.02,0.06,0,'涨跌封单'),DOTLINE,COLORRED;
DRAWNUMBER_FIX(1,0.07,0.06,0,CONST(涨跌停封单)),DOTLINE,COLORRED;
封单比:=涨跌停封单/FINANCE(7)*100;
DRAWTEXT_FIX(1,0.01,0.85,0,'封 单 比='),COLORGREEN;
DRAWNUMBER_FIX(1,0.07,0.85,0,CONST(封单比)),COLORGREEN;
总涨幅周期:=350;
高点位:=REFDATE(HHV(H,总涨幅周期),DATE);
低点位:=REFDATE(LLV(L,总涨幅周期),DATE);
低位价:=REF(L,BARSLAST(低点位=L)),COLORGREEN;
高位价:=REF(H,BARSLAST(高点位=H)),COLORRED,NODRAW;
曾最大涨幅:=(高位价-低位价)/低位价*100;
当前涨幅:=(C-低位价)/低位价*100;
ZFA:=CON2STR(CONST(曾最大涨幅),2);
ZFB:=CON2STR(CONST(当前涨幅),2);
ZFC:=STRCAT('【曾最大涨幅】:',ZFA);
ZFD:=STRCAT(ZFC,'%');
ZFE:=STRCAT(ZFD,'【当前总涨幅】:');
ZFF:=STRCAT(ZFE,ZFB);
ZFG:=STRCAT(ZFF,'%');
{涨停柱红涨停兰跌停}
C2:=REF(C,1);
涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(涨停,OPEN,CLOSE,2,0),COLOR0000FF;
STICKLINE(涨停,H,L,0,0),COLOR0000FF;
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(跌停,H,L,0,1),COLORGREEN;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(Abs(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=zig(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'低吸'),COLORMAGENTA;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
DRAWTEXT(卖1>0,HIGH*1.02,'减仓'),COLORGREEN;