通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
筹码集中度副图指标公式
TYP:=(HIGH+LOW+CLOSE)/3;
YY:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
TGLJ:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
日出:IF(CROSS(TGLJ,-200),-200,0),STICK,LAYER0,COLORRED,LINETHICK3;
DRAWICON(CROSS(TGLJ,-200),200,12);
FILLRGN(0,YY,YY0,RGB(255,0,255),YY0,RGB(0,250,0));
STICKLINE(YY0,-202,-200,6,0),COLORGREEN;
STICKLINE(YY0,-202,-200,6,1),COLORRED;
DRAWGBKLAST(C0,STRIP(RGB(0,0,0),RGB(0,50,50),0));
DRAWTEXTABS(10,5,'沙吾提制作'),COLOR00FFFF,LINETHICK2;
DPC:=INDEXC;
DPO:=INDEXO;
DPH:=INDEXH;
DPL:=INDEXL;
STICKLINE(DPCDPO,DPC,DPO,8,0),COLOR0000FF;
STICKLINE(DPCDPO,DPH,DPL,0.5,0),COLOR0000FF;
STICKLINE(DPCDPO,DPC,DPO,8,0),COLOR00FF00;
STICKLINE(DPCDPO,DPH,DPL,0.5,0),COLOR00FF00;
SH:=STKINDI('1A0001','1A0001');
SZ:=STKINDI('399001','399001');
IFSTRCMP(MARKETLABEL,'SH')=0THENBEGINDRAWTEXTABS(200,0,'上证指数'),LINETHICK5,Color6666FF;END;
IFSTRCMP(MARKETLABEL,'SZ')=0THENBEGINDRAWTEXTABS(200,0,'深圳成份指数'),LINETHICK5,Color6666FF;END;
上证MA1:=STKINDI('1A0001','MA.MA1');
深证MA1:=STKINDI('399001','MA.MA1');
上证MA2:=STKINDI('1A0001','MA.MA2');
深证MA2:=STKINDI('399001','MA.MA2');
上证MA3:=STKINDI('1A0001','MA.MA3');
深证MA3:=STKINDI('399001','MA.MA3');
上证MA4:=STKINDI('1A0001','MA.MA4');
深证MA4:=STKINDI('399001','MA.MA4');
上证MA5:=STKINDI('1A0001','MA.MA5');
深证MA5:=STKINDI('399001','MA.MA5');
上证MA6:=STKINDI('1A0001','MA.MA6');
深证MA6:=STKINDI('399001','MA.MA6');
大盘MA5:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA1,深证MA1),COLORFFFFFF;
大盘MA10:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA2,深证MA2),COLOR00FFFF;
大盘MA20:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA3,深证MA3),COLOR3333FF;
大盘MA30:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA4,深证MA4),COLOR5399FF;
大盘MA60:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA5,深证MA5),COLOR9900CC;
大盘MA120:IF(STRCMP(MARKETLABEL,'SH')=0,上证MA6,深证MA6),COLOR39FF00;
DRAWTEXTABS(5,30,'目前指数:'+INDEXC+'点'),COLORFFFFFF;
DRAWTEXTABS(5,50,'昨日收盘:'+REF(INDEXC,1)+'点'),COLORFFFFFF;
DRAWTEXTABS(5,70,'今日开盘:'+INDEXO+'点'),COLORFFFFFF;
DRAWTEXTABS(5,90,'今日最高:'+INDEXH+'点'),COLORFFFFFF;
DRAWTEXTABS(5,110,'今日最低:'+INDEXL+'点'),COLORFFFFFF;
DRAWTEXTABS(5,130,'指数涨幅:'+((INDEXC-REF(INDEXC,1))/INDEXC)*100+'%'),COLORFFFFFF;
DRAWTEXTABS(5,150,'上涨家数:'+INDEXADV+'家'),COLORFF00FF;
DRAWTEXTABS(5,170,'走平家数:'+INDEXDEC+'家'),COLOR00FFFF;
DRAWTEXTABS(5,190,'下跌家数:'+INDEXDEC+'家'),COLOR39FF00;
上证DIFF:=STKINDI('1A0001','MACD.DIFF');
深证DIFF:=STKINDI('399001','MACD.DIFF');
上证DEA:=STKINDI('1A0001','MACD.DEA');
深证DEA:=STKINDI('399001','MACD.DEA');
上证MACD:=STKINDI('1A0001','MACD.MACD');
深证MACD:=STKINDI('399001','MACD.MACD');
大盘DIFF:=IF(STRCMP(MARKETLABEL,'SH')=0,上证DIFF,深证DIFF);
大盘DEA:=IF(STRCMP(MARKETLABEL,'SH')=0,上证DEA,深证DEA);
大盘MACD:=IF(STRCMP(MARKETLABEL,'SH')=0,上证MACD,深证MACD);
DRAWTEXTABS(165,30,'大盘DIFF:'+大盘DIFF),COLORFFFFFF;
DRAWTEXTABS(165,50,'大盘DEA:'+大盘DEA),COLOR00FFFF;
DRAWTEXTABS(165,70,'大盘MACD:'+大盘MACD),COLORFF00FF;
上证K:=STKINDI('1A0001','KDJ.K');
深证K:=STKINDI('399001','KDJ.K');
上证D:=STKINDI('1A0001','KDJ.D');
深证D:=STKINDI('399001','KDJ.D');
上证J:=STKINDI('1A0001','KDJ.J');
深证J:=STKINDI('399001','KDJ.J');
大盘K:=IF(STRCMP(MARKETLABEL,'SH')=0,上证K,深证K);
大盘D:=IF(STRCMP(MARKETLABEL,'SH')=0,上证D,深证D);
大盘J:=IF(STRCMP(MARKETLABEL,'SH')=0,上证J,深证J);
DRAWTEXTABS(165,90,'大盘K:'+大盘K),COLORFFFFFF;
DRAWTEXTABS(165,110,'大盘D:'+大盘D),COLOR00FFFF;
DRAWTEXTABS(165,130,'大盘J:'+大盘J),COLORFF00FF;
DRAWTEXTABS(310,30,'大盘5天均线:'+大盘MA5),COLORFFFFFF,LINETHICK2;
DRAWTEXTABS(310,50,'大盘10天均线:'+大盘MA10),COLOR00FFFF,LINETHICK2;
DRAWTEXTABS(310,70,'大盘20天均线:'+大盘MA20),COLORFF00FF,LINETHICK2;
DRAWTEXTABS(310,90,'大盘30天均线:'+大盘MA30),COLOR39FF00,LINETHICK2;
DRAWTEXTABS(310,110,'大盘60天均线:'+大盘MA60),COLORFF3366,LINETHICK2;
DRAWTEXTABS(310,130,'大盘120天均线:'+大盘MA120),COLORFFCC00,LINETHICK2;
上证BIAS1:=STKINDI('1A0001','BIAS.BIAS1');
深证BIAS1:=STKINDI('399001','BIAS.BIAS1');
上证BIAS2:=STKINDI('1A0001','BIAS.BIAS2');
深证BIAS2:=STKINDI('399001','BIAS.BIAS2');
上证BIAS3:=STKINDI('1A0001','BIAS.BIAS3');
深证BIAS3:=STKINDI('399001','BIAS.BIAS3');
大盘BIAS1:=IF(STRCMP(MARKETLABEL,'SH')=0,上证BIAS1,深证BIAS1);
大盘BIAS2:=IF(STRCMP(MARKETLABEL,'SH')=0,上证BIAS2,深证BIAS2);
大盘BIAS3:=IF(STRCMP(MARKETLABEL,'SH')=0,上证BIAS3,深证BIAS3);
DRAWTEXTABS(165,150,'大盘BIAS1:'+大盘BIAS1),COLORFFFFFF;
DRAWTEXTABS(165,170,'大盘BIAS2:'+大盘BIAS2),COLOR00FFFF;
DRAWTEXTABS(165,190,'大盘BIAS3:'+大盘BIAS3),COLORFF00FF;
m5:cost(5);
m10:cost(10);
m20:cost(20);
m30:cost(30);
m40:cost(40);
m50:cost(50);
m60:cost(60);
m70:cost(70);
m80:cost(80);
m90:cost(90);
cyc5:ema(AMOUNT/(100*vol),5),colorwhite;
cyc51:=ema(cyc5,2);
cyc52:=ema(cyc51,2);
cyc53:=ema(cyc52,2);
cyc54:=ema(cyc53,2);
cyc55:=ema(cyc54,2);
cyc56:ema(cyc55,2),coloryellow;
PARTLINE(cyc51,cyc51ref(cyc51,1),rgb(255,0,0),cyc51ref(cyc51,1),rgb(0,255,0),1,rgb(0,0,255)),DOTLINE;
PARTLINE(cyc52,cyc52ref(cyc52,1),rgb(255,0,0),cyc52ref(cyc52,1),rgb(0,255,0),1,rgb(0,0,255)),DOTLINE;
PARTLINE(cyc53,cyc53ref(cyc53,1),rgb(255,0,0),cyc53ref(cyc53,1),rgb(0,255,0),1,rgb(0,0,255)),DOTLINE;
PARTLINE(cyc54,cyc54ref(cyc54,1),rgb(255,0,0),cyc54ref(cyc54,1),rgb(0,255,0),1,rgb(0,0,255)),DOTLINE;
PARTLINE(cyc55,cyc55ref(cyc55,1),rgb(255,0,0),cyc55ref(cyc55,1),rgb(0,255,0),1,rgb(0,0,255)),DOTLINE;
筹码集中度主图公式
input:n(5,1,100,1);
DRAWGBKLAST(v1,STRIP(RGB(0,100,0),RGB(0,0,0),0));
MA5:MA(CLOSE,5),PRECIS2,COLORred,linethick2;
MA10:MA(CLOSE,10),PRECIS2,color009900,linethick2;
MA20:MA(CLOSE,20),linethick0;
MA30:MA(CLOSE,30),PRECIS2,colorffffFF,linethick0;
MA120:=MA(CLOSE,120);
MA250:=MA(CLOSE,250);
{底:llv(l,N),color009900,PRECIS2,CROSSDOT;}
DTPL:=MA10MA30 AND MA20MA30 AND MA30REF(MA30,1);
破线:MIN(MA20*1.05,MA30*1.1),COLORff89b2,DOTLINE,LINETHICK1,PRECIS2;
差幅:=C/MIN(MA20*1.05,MA30*1.1)-1;
均线流:=(DTPL AND MA5MA30 AND MA5MA10)*-0.1;
偏离率:=(CMIN(MA20*1.05,MA30*1.1) AND CMA30)*0.1;
BDGD:=C=HHV(C,20);
GDSJ:=BARSLAST(BDGD);
REF(C,GDSJ),COLORff9933,POINTDOT,LINETHICK3,PRECIS2;
{C/REF(C,GDSJ)-1,COLOR00FF00,POINTDOT;}
目标:=IF(均线流=-0.1 AND 偏离率=0.1 AND GDSJ=N,0.8,0);
MBSJ:=BARSLAST(目标=0.8);
TP1:=CROSS(C,MIN(MA20*1.05,MA30*1.1)) AND REF(GDSJ,1)=N;
TP2:=偏离率=0 AND REF(COUNT(偏离率=0.1,N)=N,1) AND CREF(C,1);
突破:=(TP1 OR TP2)*1;
QSXS1:=MA5REF(MA5,1);
LYHT:=DTPL AND MA5MA10 AND NOT(QSXS1) AND REF(QSXS1,1);
MAV5:=EMA(V,5);
MAV10:=EMA(V,10);
LNMACD:=((V-MAV5)/MAV5*2+(V-MAV10)/MAV10)*10;
量坑:=LNMACD=-10;
优选:=目标 AND COUNT(量坑,3)=1;
{以下设置主图显示方式}
DRAWTEXT(目标=0.8,L*1.009,'='),colorFFFFFF,LINETHICK3,ALIGN1;
DRAWTEXT(突破,L,'★'),coloryellow;
DRAWTEXT(LYHT,(MA10+MA20)/2, ''),COLORFF00FF;
DRAWICON(优选,L*0.98,1),ALIGN1;
GX:=MAX(MA5,MAX(MA10,MA20));
DX:=MIN(MA5,MIN(MA10,MA20));
QSXS:=DXMA30 AND MA30REF(MA30,1);
均线粘合:=IF(ABS(GX/DX-1)*100=3,1,0);
FL:=VREF(V,1) OR VMA(V,5);
SZ:=(CROSS(C,MA(C,3)) OR CROSS(C,MA(C,5))) AND C=O;
放量上涨:=IF(FL AND SZ,1,0);
果断出击:=FILTER(COUNT(均线粘合,2) AND COUNT(放量上涨,2) AND CO AND QSXS,2)*100;
{以下设置果断出击后的涨幅跟踪,不需要的可以删除}
MRSJ:=BARSLAST(果断出击);
涨:=(C/REF(C,MRSJ)-1)*100*(MRSJ=20);
ZZ:=MRSJ20 AND CROSS(H,REF(C,MRSJ)*1.09999);
知足:=ZZ AND COUNT(ZZ,MRSJ)=1;
DB:=MRSJ20 AND CROSS(H,REF(C,MRSJ)*1.05);
达标:=DB AND COUNT(DB,MRSJ)=1;
DRAWTEXT(知足,H*1.03,'+10%'),COLORFFFFFF;
DRAWTEXT(果断出击,L,'♂'),COLORFFFF33,ALIGN1,LINETHICK3;
DRAWTEXT(达标,H*1.01,'+5%'),COLORYELLOW,ALIGN1;
WR5:=100*(HHV(H,5)-C)/(HHV(H,5)-LLV(L,5));
WR6:=100*(HHV(H,6)-C)/(HHV(H,6)-LLV(L,6));
WR:=80-(WR5*3+WR6*2)/5;
DRAWTEXT(WR-10,L*0.99, '#'),COLOR00ff00;
MTM:=C-REF(C,1);
DX1:=100*EMA(EMA(MTM,N),N)/EMA(EMA(ABS(MTM),N),N);
买1:=IF(LLV(DX1,2)=LLV(DX1,7) AND COUNT(DX10,2) AND CROSS(DX1,MA(DX1,2)),1,0);
卖1:=IF(HHV(DX1,2)=HHV(DX1,7) AND COUNT(DX150,2) AND CROSS(MA(DX1,2),DX1),1,0);
DRAWTEXT(filter(卖1=1,5),high*1.02,'卖'),color00ff00,ALIGN1;
DRAWTEXT(filter(买1=1,5),low*0.99, '买'),colorRED,ALIGN1;
QSXS3:=MA20=REF(MA20,1);
DTPL3:=MA5MA10 AND MA10MA20 AND MA20MA30;
ZWP3:=COUNT(CMA20,5)=5 AND DTPL3;
HCP3A:=CROSS(MA20*1.03,L) AND REF(ZWP3,1);
HCP3B:=CROSS(MA20,C) AND REF(ZWP3,1);
回3:=((HCP3A OR HCP3B) AND QSXS3)*3;
HCSJ3:=BARSLAST(回3);
ZC3:=(CROSS(C,MA20) OR CROSS(C,MA20*1.03)) AND HCSJ3=5;
支撑:IF(COUNT(ZC30,5),REF(L,HCSJ3),REF(L,HCSJ3)),COLORFF00ff,POINTDOT,linethick3,PRECIS2;
KK:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.14159;
准备:=CROSS(KK,0)*80;
ZBSJ:=BARSLAST(准备=80);
IF(NOT(准备=80),REF(L,ZBSJ),REF(L,ZBSJ)),COLOR00FF00,POINTDOT,linethick3,PRECIS2;
主筹估算:=EMA(WINNER(c)*70,3);
散筹估算:=EMA((WINNER((c)*1.1)-WINNER((c)*0.9))*70,3);
筹码锁定:=散筹估算-主筹估算 ;
动态底部:=EMA(IF(L= LLV(l,60),SMA(ABS(L-REF(L,1)),60,1)/SMA(MAX(L-REF(l,1),0),99,1),0)*5,3);
涨:=CROSS(主筹估算,筹码锁定);
强:=CROSS(主筹估算,散筹估算);
STICKLINE(涨,O,C,4,0),COLORYELLOW;
STICKLINE(涨,O,H,0,0),COLORYELLOW;
STICKLINE(涨,L,C,0,0),COLORYELLOW;
STICKLINE(强, O,C,4,0),colormagenta;
STICKLINE(强,O,H,0,0),colormagenta;
STICKLINE(强,L,C,0,0),colormagenta;
STICKLINE(筹码锁定-50,O,C,4,0),COLORred;
STICKLINE(筹码锁定-50,O,H,0,0),COLORred;
STICKLINE(筹码锁定-50,L,C,0,0),COLORred;
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(DISPSTATUS=2 and c=今日阻力,今日阻力,今日阻力,20,0),ColorRED;
STICKLINE(DISPSTATUS=2 and c今日阻力,今日阻力,今日阻力,20,0),Color00FFFF;
STICKLINE(DISPSTATUS=2 and c=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2 and c今日支撑,今日支撑,今日支撑,20,0),Color00ADFF;
DRAWTEXTREL(610,40,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),Colorred;
DRAWTEXTREL(610,5,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),Color00FFFF;
买入:=STRFIND(Extrastring('评级'),'买入',1)0;
增持:=STRFIND(Extrastring('评级'),'增持',1)0;
持有:=STRFIND(Extrastring('评级'),'持有',1)0;
DRAWTEXTREL(5,970,'评级:'+Extrastring('评级')),ColorFFB6C1;
{DRAWTEXTABS(5,360,'板块:'+BKNAME),ColorRED;}
流通:=FINANCE2(37)/10000;
市盈率:=DYNAINFO(39);
F:=COST(5 );J:=COST(95 );
M:=COST(15 );B:=COST(85 );
F1:=(J-F)/(F+J)*100;M1:=(B-M)/(B+M)*100;
集中度90:=F1;
集中度70:=M1;
获利盘:=WINNER(CLOSE)*100;
套牢盘:=100*(1-WINNER(C));
最新收益:=FINANCE2(3);
浮筹比:=(winner(c*1.1)-winner(c*0.9))/winner(hhv(h,0))*100; DRAWTEXTABS(5,50,'浮筹比:'+浮筹比+'% '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(300,5,'流通:'+流通+' '),LINETHICK1,Colora9a9a9;DRAWTEXTABS(5,65,'市盈率:'+市盈率+' '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(5,5,'集中度90:'+集中度90+' '),LINETHICK1,Color00FF00;
DRAWTEXTABS(100,5,'集中度70:'+集中度70+' '),LINETHICK1,ColorYELLOW;
DRAWTEXTABS(5,20,'获利盘:'+获利盘+'% '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(5,35,'套牢盘:'+套牢盘+'% '),LINETHICK1,Colora9a9a9;
VAR1:=1;
VAR55:=LLV(LOW,8);
VAR66:=HHV(HIGH,8);
VAR77:=(VAR66-VAR55)/10;
VAR88:=SMA((CLOSE-VAR55)/VAR77,20,1);
VARA:=3*VAR88-2*SMA(VAR88,15,1);
散户筹码集中度: (10-VARA)*VAR1*6,COLORGREEN,LINETHICK2;
VAR100:=(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*(10);
增减力度:VAR100*16,COLORMAGENTA,LINETHICK2;
散筹估算:EMA((WINNER(C*1.1)-WINNER(C*0.9))*70,3),COLORFFFFFF;
主持仓:=EMA(100*(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30)),9);
庄筹集中度:=EMA(主持仓,1);
庄筹集中监控线:EMA(庄筹集中度,1), COLORCYAN;
主力持仓:EMA(100*(CLOSE- LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF;
主力筹码集中度:WINNER(C)*100,COLORRED;
机构筹码集中度:EMA(WINNER(C)*70,3),LINETHICK2,COLORRED;
V1:=LLV(LOW,10);
V2:=HHV(HIGH,20);
lyf1:=EMA(((CLOSE-V1)/(V2-V1))*((-100)),3);
VARg5:=((CLOSE)/(REF(CLOSE,5))=1.15);
VARg6:=BACKSET(VARg5,5);
入市日:=IF((VARg6 AND (COUNT(VARg6,5)=1) or (CLOSE=HHV(HIGH,HIGH))
AND ((CLOSE)/(REF(CLOSE,1))1.098) AND (REF(VOL,LOW)REF(VOL,34))
AND (REF(VOL,LOW)REF(VOL,1)) AND (LYF1(-93))
AND (REF(VOL,LOW)REF(VOL,8))),60,0);
DRAWTEXT(cross(入市日 ,(58)),20,'十年不败 '),colorgreen;
TYP:=(HIGH+LOW+CLOSE)/3;
C2:=(TYP-MA(TYP,82))/(0.015*AVEDEV(TYP,82));
DRAWTEXT(cross(C2,-70),5,'CCI牛启动 '),colorgreen;
庄筹线:=EMA(WINNER(C)*50,4);
散筹线:=EMA((WINNER(C*1.1)-WINNER(C*0.9))*50,4);
AA:= REF(庄筹线,30)40 OR REF(庄筹线,20)40;
DRAWTEXT(cross(庄筹线,散筹线),15,'庄筹 '),colorgreen;
K1:=CLOSE/REF(CLOSE,3)=1.1;
D1:=BACKSET(K1,3);
加仓买:=IF((D1 AND COUNT(D1,13)=1),58,0);
D2:=CLOSE/REF(CLOSE,3)=1.1;
D3:=BACKSET(D2,3);
短线买:=IF((D3 AND COUNT(D3,3)=1),45,0);
D4:=CLOSE/REF(CLOSE,3)=1.1;
D5:=BACKSET(D4,3);
易涨停:=IF((D5 AND COUNT(D5,15)=1),30,0);
XG:=加仓买 AND 短线买 AND 易涨停;
DRAWTEXT(cross(XG,0),35,'加仓买 '),colorgreen;
参考低7:IF(TROUGHBARS(3,7,1)=0 AND HIGHLOW+0.04,10,0);
VAR1:=(INDEXC-MA(INDEXC,58))/MA(INDEXC,58)-0.152;
VAR2:=(C-EMA(C,58))/EMA(C,58)-0.19;
底区:COUNT(VAR2 AND VAR1,2) ;
抄底:参考低7 AND 底区1,COLORBLUE;
DRAWTEXT(抄底,1,'抄底'),COLORBLUE;
VAR3:=PEAKBARS(3,15,1)10;
VAR5:=IF(VAR3=1,2,0);
顶:= IF(VAR5=2,2,0);
顶A:IF(顶REF(顶,1),90,100),COLORGREEN;
DRAWTEXT(顶A=90,90,'卖'),COLORGREEN;
引用 :通达信主力筹码副图公式 通信达公式指标大全 – 南方财富网
评论(0)