通达信筹码主图指标 集合四种筹码表现形式挖掘主力行为 源码 附图
N1:=34;
DA1:=IF(130>TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT>DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA);
L1:=REFDATE(HHV(LH1,DA),DATE);
L2:=REFDATE(HHV(LH2,DA),DATE);
L3:=REFDATE(HHV(LH3,DA),DATE);
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
STICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI/GZ*0.98-GZ*0.0019,HI/GZ*0.97,9,0),,COLOR002288,LINETHICK1;
STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,2),9,0),COLOR800600,LINETHICK1;
STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3),HI/POW(GZ,3)*99/100,9,0),COLOR808300,LINETHICK1;
STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4),HI/POW(GZ,4)*99/100,9,0),COLOR883D88,LINETHICK3;
STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,5),9,0),COLOR777700,LINETHICK3;
STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,6),9,0),COLOR804000,LINETHICK3;
STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,7)*99/100,HI/POW(GZ,7),9,0),COLOR003377,LINETHICK3;
STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,2)*99/100,9,0),COLORLICYAN,LINETHICK3;
STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,1)*99/100,9,0),COLORLIMAGENTA,LINETHICK1;
STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO-LO*0.01,9,0),COLORBROWN,LINETHICK1;
DRAWKLINE(H,O,L,C);
ZT:C/REF(C,1)>1.094 AND H=C;
STICKLINE(ZT,C,O,3.0,0),COLORYELLOW;
W5:COST(5),DOTLINE;
W95:COST(95),DOTLINE;
C2:W95-W5,NODRAW;
获利筹码:CONST(WINNER(C)*100),NODRAW;
ZG:=HHV(H,598);
BZ:C2/ZG*100,NODRAW;
JZ:BZ<20 AND CROSS(C,COST(90)) AND C/REF(C,1)>1.0618;
DRAWICON(JZ,L*0.989,38);
{过前高}
GJ:=HHV(H,N1),COLORRED,POINTDOT;
ZTS:BARSLAST(GJ<>REF(GJ,1))>=6,NODRAW;
TJ1:=BARSLAST(GJ=REF(GJ,1));
HX:H>IF(ZTS=1,REF(GJ,1),DRAWNULL),NODRAW;
AA1:=REF(GJ,N1)=HHV(GJ,2*N1+1);
BB1:=FILTER(AA1,N1);
CC1:=BACKSET(BB1,N1+1);
DD1:=FILTER(CC1,N1),NODRAW;{高点}
前期高点:=REF(GJ,BARSLAST(DD1)),COLORFF00FF,DOTLINE;
PT:STICKLINE(C>0,前期高点,前期高点,1,0),COLORRED;
PL1:=(CROSS(C,REF(前期高点,1))OR L<前期高点 AND C>前期高点) AND C/REF(C,1)>=1.098 AND C=H,NODRAW;
STICKLINE(PL1,(C+O)/2,C,3,0),COLORRED;
A1:MCST;
S升:IF(A1>=REF(A1,1),A1,DRAWNULL),LINETHICK2 COLORYELLOW;
S降:IF(A1<REF(A1,1),A1,DRAWNULL),LINETHICK2,COLORLICYAN;
MR:=CROSS(C,A1) AND ZT;
DRAWICON(MR,L*0.999,15);
MCST:=DMA(AMOUNT/(100*VOL),VOL/CAPITAL);{市场成本=以成交量(手)/当前流通股本(手)为权重成交额(元)/(100*成交量(手))的动态移动平均};
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:WINNER
该公式包含未来函数:COST
该公式包含未来函数:CAPITAL
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
N1赋值:34
如果130>TOTALBARSCOUNT返回TOTALBARSCOUNT否则返回130
如果 到最后交易的周期>DA1返回0否则返回DA1
HI赋值:REFDATE(DA日内H最高值,DATE)
LO赋值:REFDATE(DA日内L最低值,DATE)
如果 到最后交易的周期<=DA返回C否则返回DRAWNULL
GZ赋值:EXP(LN(HI/LO)/10)
LH1赋值:SUM(IF(C1>=(HI/GZ),V,0),DA)
LH2赋值:SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA)
LH3赋值:SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA)
LH4赋值:SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA)
LH5赋值:SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA)
LH6赋值:SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA)
LH7赋值:SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA)
LH8赋值:SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA)
LH9赋值:SUM(IF(C1>=(LO*GZ) AND C1如果C1>=LO AND C1
L1赋值:REFDATE(DA日内LH1最高值,DATE)
L2赋值:REFDATE(DA日内LH2最高值,DATE)
L3赋值:REFDATE(DA日内LH3最高值,DATE)
L4赋值:REFDATE(DA日内LH4最高值,DATE)
L5赋值:REFDATE(DA日内LH5最高值,DATE)
L6赋值:REFDATE(DA日内LH6最高值,DATE)
L7赋值:REFDATE(DA日内LH7最高值,DATE)
L8赋值:REFDATE(DA日内LH8最高值,DATE)
L9赋值:REFDATE(DA日内LH9最高值,DATE)
L10:=REFDATE(DA日内LH10最高值,DATE)
SS赋值:(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10)
STICKLINE(CEILING(DA*L1/SS)*3>= 到最后交易的周期,HI/GZ*0.98-GZ*0.0019,HI/GZ*0.97,9,0),,COLOR002288,LINETHICK1
STICKLINE(CEILING(DA*L2/SS)*3>= 到最后交易的周期,HI/POW(GZ,2)*99/100,HI/POW(GZ,2),9,0),COLOR800600,LINETHICK1
STICKLINE(CEILING(DA*L3/SS)*3>= 到最后交易的周期,HI/POW(GZ,3),HI/POW(GZ,3)*99/100,9,0),COLOR808300,LINETHICK1
STICKLINE(CEILING(DA*L4/SS)*3>= 到最后交易的周期,HI/POW(GZ,4),HI/POW(GZ,4)*99/100,9,0),COLOR883D88,LINETHICK3
STICKLINE(CEILING(DA*L5/SS)*3>= 到最后交易的周期,HI/POW(GZ,5)*99/100,HI/POW(GZ,5),9,0),COLOR777700,LINETHICK3
STICKLINE(CEILING(DA*L6/SS)*3>= 到最后交易的周期,HI/POW(GZ,6)*99/100,HI/POW(GZ,6),9,0),COLOR804000,LINETHICK3
STICKLINE(CEILING(DA*L7/SS)*3>= 到最后交易的周期,HI/POW(GZ,7)*99/100,HI/POW(GZ,7),9,0),COLOR003377,LINETHICK3
STICKLINE(CEILING(DA*L8/SS)*3>= 到最后交易的周期,LO*POW(GZ,2),LO*POW(GZ,2)*99/100,9,0),COLORLICYAN,LINETHICK3
STICKLINE(CEILING(DA*L9/SS)*3>= 到最后交易的周期,LO*POW(GZ,1),LO*POW(GZ,1)*99/100,9,0),COLORLIMAGENTA,LINETHICK1
STICKLINE(CEILING(DA*L10/SS)*3>= 到最后交易的周期,LO,LO-LO*0.01,9,0),COLORBROWN,LINETHICK1
DRAWKLINE(H,O,L,C)
输出ZT:C/1日前的C>1.094 AND H=C
当满足条件ZT时,在C和O之间画柱状线
输出W5:获利盘为5%的成本分布,DOTLINE
输出W95:获利盘为95%的成本分布,DOTLINE
输出C2:W95-W5,NODRAW
输出获利筹码:CONST(C计算的获利盘比例*100),NODRAW
ZG赋值:598日内H最高值
输出BZ:C2/ZG*100,NODRAW
输出JZ:BZ<20 AND CROSS(C,获利盘为90%的成本分布) AND C/1日前的C>1.0618
当满足条件JZ时,在L*0.989和38之间画图标
{过前高}
GJ赋值:N1日内H最高值,COLORRED,POINTDOT
ZTS:上次GJ<>1日前的GJ距今天数>=6,NODRAW
TJ1赋值:上次GJ=1日前的GJ距今天数
输出HX:H>IF(ZTS=1,1日前的GJ,DRAWNULL),NODRAW
AA1赋值:N1日前的GJ=2*N1+1日内GJ最高值
BB1赋值:AA1的N1过滤
CC1赋值:BACKSET(BB1,N1+1)
DD1赋值:CC1的N1过滤,NODRAW
{高点}
前期高点赋值:REF(GJ,上次DD1距今天数),COLORFF00FF,DOTLINE
当满足条件C>0时,在前期高点和前期高点之间画柱状线
PL1赋值:(CROSS(C,1日前的前期高点)OR L<前期高点 AND C>前期高点) AND C/1日前的C>=1.098 AND C=H,NODRAW
STICKLINE(PL1,(C+O)/2,C,3,0),COLORRED
输出A1:MCST
输出S升:IF(A1>=1日前的A1,A1,DRAWNULL),LINETHICK2 COLORYELLOW
输出S降:IF(A1<1日前的A1,A1,DRAWNULL),LINETHICK2,COLORLICYAN
MR赋值:C上穿A1 AND ZT
当满足条件MR时,在L*0.999和15之间画图标
MCST赋值:DMA(成交额/(100*成交量),成交量/当前流通股本)
{市场成本=以成交量(手)/当前流通股本(手)为权重成交额(元)/(100*成交量(手))的动态移动平均}