相关简介:通达信控盘系数指标公式源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:副图
本指标:一个幅图公式,一个预警公式,主图暂时不提供
控盘是主力拉升股价前必做的动作!
分析之前的妖股(见图中),大多数都是从高度控盘开始拉升股价!
随时关注主力高度控盘的股票,
是跟主力买入的最佳机会(必须结合当前热点)!
本公式就能对主力高度控盘动作迅速发出预警!
通达信指标公式源码:
P:=0;
DRAWBAND(10,RGB(25,60,68),5,RGB(0,0,0));
DRAWBAND(95,RGB(25,60,68),90,RGB(0,0,0));
A1:=LLV(LOW,6)=LLV(LOW,41)ANDLLV(LOW,6) HHV(LOW,41)*71/100;
B2:=HIGH LOW*1.033;
STICKLINE(A1 0ANDB2,10,5,4,0),COLORRED;
DPK30:=SMA(((INDEXC-LLV(INDEXL,30))/(HHV(INDEXH,30)-LLV(INDEXL,30))*100),3,1);
HYK30:=SMA(((HY_INDEXC-LLV(HY_INDEXL,30))/(HHV(HY_INDEXH,30)-LLV(HY_INDEXL,30))*100),3,1);
K30:=SMA(((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100),3,1);
DRAWBAND(K30,RGB(0,250,250),10,RGB(250,250,0));
STICKLINE(C 0,90,10,10,0),COLOR000000;
值:DPK30*P,COLORLICYAN,DOTLINE;
行业值:HYK30*P,COLORGRAY,DOTLINE;
系数值:K30,COLORYELLOW;
牵牛值:SMA(((CLOSE-LLV(LOW,250))/(HHV(HIGH,250)-LLV(LOW,250))*100),3,1),COLORMAGENTA;
DRAWICON(CROSS(90,K30),90,2);
DRAWICON(CROSS(90,牵牛值),96,12);
DRAWICON(CROSS(K30,牵牛值),K30,1);
DRAWTEXT_FIX(1,0,0,0,'周线断牛熊'),COLORLIGRAY;
价量:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)
-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)
,COLOR00CCFF,NODRAW;
主线:(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25)
,COLORCYAN,NODRAW;
快线:(((价量-LLV(价量,9))/(HHV(价量,9)-LLV(价量,9)))*(4))*(25)
,COLOR55AAFF,NODRAW;
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
KK:=INTPART(K1);
DD:=INTPART(D1);
TFXXS:=KK+DD;{变异KD风险系数}
TGLXS:=(TFXXS-REF(TFXXS,1));{变异KD乖离系数:流向}
{红}
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR0000AA;
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR0022CC;
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR0055FF;
{粉}
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORAA00BB;
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORCC22BB;
STICKLINE(TGLXS 0ANDTGLXS REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFF55BB;
{黄}
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,2.5,0),COLOR00AAFF;
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,1.5,0),COLOR00CCFF;
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,0.5,0),COLOR00FFFF;
{蓝}
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,2.5,0),COLORFF7700;
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,1.5,0),COLORFFAA22;
STICKLINE(TGLXS 0ANDTGLXS =REF(TGLXS,1),100,TGLXS+100,0.5,0),COLORFFFF55;
STICKLINE(TGLXS=0ANDREF(TGLXS,1) =0,100,TGLXS+100,8,0),COLORBROWN;
STICKLINE(TGLXS=0ANDREF(TGLXS,1) 0,100,TGLXS+100,8,0),COLORWHITE;
ZLCM:=EMA(WINNER(CLOSE)*70,3);{估算}
SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{筹码估算}
ZSHTL:=SHCM/(ZLCM+SHCM)*100;{散户套牢筹码系数}
ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{主力控盘筹码系数}
ZSHJJ:=EMA(ZSHTL,55);{散户警戒}
ZZLJJ:=EMA(ZZLKP,55);{主力警戒}
散兵坑:IF(ZZLKP =10,ZZLKP,ZZLKP),COLORMAGENTA,NODRAW;
{散户套牢筹码}
STICKLINE(C 0,ZSHTL,ZZLKP,2,0),COLOR808080;
{散户筹码警戒}
STICKLINE(ZSHJJ REF(ZSHJJ,1),ZSHTL,ZSHJJ,2,0),COLORC0C0C0;
{主力控盘筹码}
{粉}
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,2.5,0),COLORAA00BB;
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,1.5,0),COLORCC22BB;
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,0.5,0),COLOREE44BB;
{蓝}
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,2.5,0),COLORFF7700;
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,1.5,0),COLORFFAA22;
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,20,0.5,0),COLORFFFF55;
{亮红}
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,2.5,0),COLOR131FFD;
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,1.5,0),COLOR5050FF;
STICKLINE(ZZLKP REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,0.5,0),COLOR7E7EFF;
{深蓝}
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,2.5,0),COLORAA0000;
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,1.5,0),COLORCC0000;
STICKLINE(ZZLKP =REF(ZZLKP,1)ANDZZLKP 20,ZZLKP,0,0.5,0),COLORFF0000;
{主力筹码警戒}
{黄}
STICKLINE(ZZLJJ REF(ZZLJJ,1),ZZLKP,ZZLJJ,2.5,0),COLOR00AAFF;
STICKLINE(ZZLJJ REF(ZZLJJ,1),ZZLKP,ZZLJJ,1.5,0),COLOR00CCFF;
STICKLINE(ZZLJJ REF(ZZLJJ,1),ZZLKP,ZZLJJ,0.5,0),COLOR00FFFF;
{红}
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50,ZZLKP,ZZLJJ,2.5,0),COLOR0000AA;
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50,ZZLKP,ZZLJJ,1.5,0),COLOR0022CC;
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50,ZZLKP,ZZLJJ,0.5,0),COLOR0055FF;
{红}
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50ANDZZLKP 50
ANDZZLJJ REF(ZZLJJ,1),ZZLKP,50,2.5,0),COLOR0000AA;
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50ANDZZLKP 50
ANDZZLJJ REF(ZZLJJ,1),ZZLKP,50,1.5,0),COLOR0022CC;
STICKLINE(ZZLKP ZZLJJANDZZLJJ 50ANDZZLKP 50
ANDZZLJJ REF(ZZLJJ,1),ZZLKP,50,0.5,0),COLOR0055FF;
{铸顶风险区}
{绿}
STICKLINE(ZZLKP 80,ZZLKP,ZZLKP-(ZZLKP-80)/2,2.5,0),COLOR00AA00;
STICKLINE(ZZLKP 80,ZZLKP,ZZLKP-(ZZLKP-80)/2,1.5,0),COLOR00CC00;
STICKLINE(ZZLKP 80,ZZLKP,ZZLKP-(ZZLKP-80)/2,0.5,0),COLOR00FF00;
{散兵坑}
STICKLINE(ZZLKP =10,ZZLKP,0,5,0),COLORDD00DD;
100,COLORGREEN;
80,COLORGREEN;
{0,COLORGREEN;}
{主线快线}
价量,COLOR0CC0FF,LINETHICK2;
主线,COLOR00FFAA,LINETHICK2;
快线,LINESTICK,COLORFF68DD
VAR1:=(CLOSE*2+HIGH+LOW)/4;
VAR2:=Ema(VAR1,21)-EMA(VAR1,34);
VAR3:=EMA(VAR2,10);
多方控盘:2*(VAR2-VAR3)*3.81,colorred;
空方控盘:(-2)*(VAR2-VAR3)*3.81,colorgreen;
stICKLINE(多方控盘 0,0,多方控盘,0,0),colorred;
STICKLINE(空方控盘 0,0,空方控盘,0,0),colorgreen;
STICKLINE(多方控盘 0,0,多方控盘,0,0),colorred;
STICKLINE(空方控盘 0,0,空方控盘,0,0),colorgreen;
DRAWTEXT(crOSS(空方控盘,多方控盘),空方控盘,'始');
DRAWTEXT(CROSS(多方控盘,空方控盘),多方控盘,'终');
[源码注释]动态公式解读
AA1赋值:收盘价/1日前的收盘价 1.08
输出XG:统计5日中满足AA1的天数=1 AND AA1