DRAWGBK(1,RGB(9,13,16),RGB(9,117,153),1,2,1);
{---------------------------------------------------------------------------------------};
TD:=IF(TOTALBARSCOUNT<117,TOTALBARSCOUNT,117);
DA:=IF(CURRBARSCOUNT<TD,TD,0);
HI:REFDATE(HHV(H,DA),DATE),crOSSDOT,LINETHICK3,COLORFFFF00;
LO:REFDATE(LLV(L,DA),DATE),CROSSDOT,LINETHICK3,COLOR00FF00;
DY:(HI+LO)/2,CROSSDOT,LINETHICK2,COLORFFFFFF;
{---------------------------------------------------------------------------------------};
CC:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/20);
VH1:=SUM(IF(CC>=HI/GZ,V,0),DA);
VH2:=SUM(IF(CC>=HI/POW(GZ,2) AND CC<HI/GZ,V,0),DA);
VH3:=SUM(IF(CC>=(HI/POW(GZ,3)) AND CC<(HI/POW(GZ,2)),V,0),DA);
VH4:=SUM(IF(CC>=(HI/POW(GZ,4)) AND CC<(HI/POW(GZ,3)),V,0),DA);
VH5:=SUM(IF(CC>=(HI/POW(GZ,5)) AND CC<(HI/POW(GZ,4)),V,0),DA);
VH6:=SUM(IF(CC>=(HI/POW(GZ,6)) AND CC<(HI/POW(GZ,5)),V,0),DA);
VH7:=SUM(IF(CC>=(HI/POW(GZ,7)) AND CC<(HI/POW(GZ,6)),V,0),DA);
VH8:=SUM(IF(CC>=(HI/POW(GZ,8)) AND CC<(HI/POW(GZ,7)),V,0),DA);
VH9:=SUM(IF(CC>=(HI/POW(GZ,9)) AND CC<(HI/POW(GZ,8)),V,0),DA);
VH10:=SUM(IF(CC>=(HI/POW(GZ,10)) AND CC<(HI/POW(GZ,9)),V,0),DA);
VH11:=SUM(IF(CC>=(HI/POW(GZ,11)) AND CC<(HI/POW(GZ,10)),V,0),DA);
VH12:=SUM(IF(CC>=(HI/POW(GZ,12)) AND CC<(HI/POW(GZ,11)),V,0),DA);
VH13:=SUM(IF(CC>=(HI/POW(GZ,13)) AND CC<(HI/POW(GZ,12)),V,0),DA);
VH14:=SUM(IF(CC>=(HI/POW(GZ,14)) AND CC<(HI/POW(GZ,13)),V,0),DA);
VH15:=SUM(IF(CC>=(HI/POW(GZ,15)) AND CC<(HI/POW(GZ,14)),V,0),DA);
VH16:=SUM(IF(CC>=(HI/POW(GZ,16)) AND CC<(HI/POW(GZ,15)),V,0),DA);
VH17:=SUM(IF(CC>=(HI/POW(GZ,17)) AND CC<(HI/POW(GZ,16)),V,0),DA);
VH18:=SUM(IF(CC>=(HI/POW(GZ,18)) AND CC<(HI/POW(GZ,17)),V,0),DA);
VH19:=SUM(IF(CC>=(HI/POW(GZ,19)) AND CC<(HI/POW(GZ,18)),V,0),DA);
VH20:=SUM(IF(CC>=(HI/POW(GZ,20)) AND CC<(HI/POW(GZ,19)),V,0),DA);
DV1:=REFDATE(HHV(VH1,DA),DATE);
DV2:=REFDATE(HHV(VH2,DA),DATE);
DV3:=REFDATE(HHV(VH3,DA),DATE);
DV4:=REFDATE(HHV(VH4,DA),DATE);
DV5:=REFDATE(HHV(VH5,DA),DATE);
DV6:=REFDATE(HHV(VH6,DA),DATE);
DV7:=REFDATE(HHV(VH7,DA),DATE);
DV8:=REFDATE(HHV(VH8,DA),DATE);
DV9:=REFDATE(HHV(VH9,DA),DATE);
DV10:=REFDATE(HHV(VH10,DA),DATE);
DV11:=REFDATE(HHV(VH11,DA),DATE);
DV12:=REFDATE(HHV(VH12,DA),DATE);
DV13:=REFDATE(HHV(VH13,DA),DATE);
DV14:=REFDATE(HHV(VH14,DA),DATE);
DV15:=REFDATE(HHV(VH15,DA),DATE);
DV16:=REFDATE(HHV(VH16,DA),DATE);
DV17:=REFDATE(HHV(VH17,DA),DATE);
DV18:=REFDATE(HHV(VH18,DA),DATE);
DV19:=REFDATE(HHV(VH19,DA),DATE);
DV20:=REFDATE(HHV(VH20,DA),DATE);
SS:=(DV1+DV2+DV3+DV4+DV5+DV6+DV7+DV8+DV9+DV10+DV11+DV12+DV13+DV14+DV15+DV16+DV17+DV18+DV19+DV20);
DT:=CURRBARSCOUNT;
{---------------------------------------------------------------------------------------};
STICKLINE(DT<=CEILING(DA*DV1/SS)*3,HI/POW(GZ,0)*99/100,HI/POW(GZ,1),9,0),COLOR0000AA;
STICKLINE(DT<=CEILING(DA*DV2/SS)*3,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0),COLOR000099;
STICKLINE(DT<=CEILING(DA*DV3/SS)*3,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0),COLOR000088;
STICKLINE(DT<=CEILING(DA*DV4/SS)*3,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0),COLOR000077;
STICKLINE(DT<=CEILING(DA*DV5/SS)*3,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0),COLOR000066;
STICKLINE(DT<=CEILING(DA*DV6/SS)*3,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0),COLOR000055;
STICKLINE(DT<=CEILING(DA*DV7/SS)*3,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0),COLOR00BBBB;
STICKLINE(DT<=CEILING(DA*DV8/SS)*3,HI/POW(GZ,7)*99/100,HI/POW(GZ,8),9,0),COLOR00AAAA;
STICKLINE(DT<=CEILING(DA*DV9/SS)*3,HI/POW(GZ,8)*99/100,HI/POW(GZ,9),9,0),COLOR009999;
STICKLINE(DT<=CEILING(DA*DV10/SS)*3,HI/POW(GZ,9)*99/100,HI/POW(GZ,10),9,0),COLOR008888;
STICKLINE(DT<=CEILING(DA*DV11/SS)*3,HI/POW(GZ,10)*99/100,HI/POW(GZ,11),9,0),COLOR007777;
STICKLINE(DT<=CEILING(DA*DV12/SS)*3,HI/POW(GZ,11)*99/100,HI/POW(GZ,12),9,0),COLOR006666;
STICKLINE(DT<=CEILING(DA*DV13/SS)*3,HI/POW(GZ,12)*99/100,HI/POW(GZ,13),9,0),COLOR005555;
STICKLINE(DT<=CEILING(DA*DV14/SS)*3,HI/POW(GZ,13)*99/100,HI/POW(GZ,14),9,0),COLOR00BB00;
STICKLINE(DT<=CEILING(DA*DV15/SS)*3,HI/POW(GZ,14)*99/100,HI/POW(GZ,15),9,0),COLOR00AA00;
STICKLINE(DT<=CEILING(DA*DV16/SS)*3,HI/POW(GZ,15)*99/100,HI/POW(GZ,16),9,0),COLOR009900;
STICKLINE(DT<=CEILING(DA*DV17/SS)*3,HI/POW(GZ,16)*99/100,HI/POW(GZ,17),9,0),COLOR008800;
STICKLINE(DT<=CEILING(DA*DV18/SS)*3,HI/POW(GZ,17)*99/100,HI/POW(GZ,18),9,0),COLOR007700;
STICKLINE(DT<=CEILING(DA*DV19/SS)*3,HI/POW(GZ,18)*99/100,HI/POW(GZ,19),9,0),COLOR006600;
STICKLINE(DT<=CEILING(DA*DV20/SS)*3,HI/POW(GZ,19)*99/100,HI/POW(GZ,20),9,0),COLOR005500;
{---------------------------------------------------------------------------------------};
DRAWKLINE(H,O,L,C);
STICKLINE(C>O OR (C=O AND (C>=REF(C,1) OR L>REF(H,1))),O,C,3,0),COLOR000099;
STICKLINE(C>O OR (C=O AND (C>=REF(C,1) OR L>REF(H,1))),O,C,1,0),COLOR6600FF;
STICKLINE(C>O OR (C=O AND (C>=REF(C,1) OR L>REF(H,1))),O,C,0,0),COLORCC66FF;
STICKLINE(C<O OR (C=O AND (C< REF(C,1) OR H<REF(L,1))),O,C,3,0),COLORFF9900;
STICKLINE(C<O OR (C=O AND (C< REF(C,1) OR H<REF(L,1))),O,C,1,0),COLORFFCC00;
STICKLINE(C<O OR (C=O AND (C< REF(C,1) OR H<REF(L,1))),O,C,0,0),COLORFFFF00;
{---------------------------------------------------------------------------------------};
UT:=IFF(NAMEINCLUDE('*')||NAMEINCLUDE('*S')||NAMEINCLUDE('ST'),
C>=ZTPRICE(REF(C,1),0.05) AND C=H AND H>0,IFF((DATE>=1200824 AND FINANCE(3)=3)||FINANCE(3)=4,
C>=ZTPRICE(REF(C,1),0.20) AND C=H AND H>0,
C>=ZTPRICE(REF(C,1),0.10) AND C=H AND H>0));
涨板次数:=SUM(UT,120);
NT:=IFF(NAMEINCLUDE('*')||NAMEINCLUDE('*S')||NAMEINCLUDE('ST'),
C<=DTPRICE(REF(C,1),0.05) AND C=L AND L>0,IFF((DATE>=1200824 AND FINANCE(3)=3)||FINANCE(3)=4,
C<=DTPRICE(REF(C,1),0.20) AND C=L AND L>0,
C<=DTPRICE(REF(C,1),0.10) AND C=L AND L>0));
{---------------------------------------------------------------------------------------};
STICKLINE(UT,C,O,3,0),COLOR3344FF;
STICKLINE(UT,C,O,2,0),COLOR5588FF;
STICKLINE(UT,C,O,1,0),COLOR77BBFF;
STICKLINE(UT,C,O,0,0),COLOR99FFFF;
STICKLINE(NT,C,O,3,0),COLOR880000;
STICKLINE(NT,C,O,2,0),COLORBB0000;
STICKLINE(NT,C,O,1,0),COLORFF0000;
STICKLINE(NT,C,O,0,0),COLORFFFF00;
{---------------------------------------------------------------------------------------};
MA5:MA(C,5),COLORFFFFFF;
MA10:MA(C,10),COLOR00FFFF;
MA20:MA(C,20),COLORFF00FF;
MA60:MA(C,60),COLORFF0000;
MA120:MA(C,120),COLOR00FF00;
MA250:MA(C,250),COLOR404080;
{---------------------------------------------------------------------------------------};
Z1:=REF(H,4)=HHV(H,2*4+1);
Y1:=FILTER(Z1,3);
C1:=BacKSET(Y1,3+1);
D1:=FILTER(C1,3);
A2:=REF(L,3)=LLV(L,2*3+1);
V2:=FILTER(A2,3);
C2:=BACKSET(V2,3+1);
D2:=FILTER(C2,3);
E1:=(REF(LLV(L,2*3),1)+REF(HHV(H,2*3),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR=1 OR BARSCOUNT(C)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BArslAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR ISLASTBAR=1 OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
UU2:=BACKSET(ISLASTBAR=1,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
突破线:REF(H,BARSLAST(VV2)),DOTLINE,COLORFF80FF;
持仓线:REF(H,BARSLAST(XX2)),DOTLINE,COLOR80FFFF;
TP1:=CROSS(C,突破线);
TP2:=CROSS(C,持仓线);
{---------------------------------------------------------------------------------------};
涨幅:=(C/LLV(C,60)-1)*100;
跌幅:=(C/HHV(C,60)-1)*100;
低筹:=HI/POW(GZ,18);
低吸:=COUNT(C<REF(C,1),8)/8>0.6 AND (C/低筹-1)*100<3 AND C>低筹 AND 低筹>=REF(低筹,1) AND 跌幅<-10;
{---------------------------------------------------------------------------------------};
DRAWTEXT(TP1,突破线,VARCAT(' ← 突破前高',VAR2STR(突破线,2))),COLORFF80FF;
DRAWTEXT(TP2,持仓线,VARCAT(' ← 突破持仓',VAR2STR(持仓线,2))),COLOR80FFFF;
DRAWTEXT(低吸,L,'←低吸'),COLOR00FFFF;
所属:=STRCAT(STRCAT(STRCAT(STRSPACE(DYBLOCK),STRSPACE(GNBLOCK)),STRSPACE(HYBLOCK)),STRSPACE(FGBLOCK));
机构家数:=STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT(STRCAT('机构数:',
CON2STR(FINVALUE(246),0)),' 家 持股:'),IF(FINVALUE(247)/100000000>0,
CON2STR(FINVALUE(247)/100000000,2),CON2STR(FINVALUE(247)/10000,2))),
IF(FINVALUE(247)/100000000>0,'亿股 占流比','万股 占流比')),
CON2STR(FINVALUE(247)/FINVALUE(239)*100,2)),'% 国家队:'),CON2STR(FINVALUE(284),2)),'万股 120涨板:'),CON2STR(涨板次数,0)),'次');
DRAWTEXT_FIX(ISLASTBAR,0,0.82,0,IF(FINANCE(3)==0,DRAWNULL,机构家数)),COLORFFFFFF;
DRAWTEXT_FIX(ISLASTBAR,0,1.00,0,所属),COLORFFFFFF;
通达信箱体筹码主图指标公式
本文来自网络,不代表公式指标立场,转载请注明出处:https://www.gszb.top/14903.html