相关简介:通达信最准的看主力持仓指标公式(主力筹码选股)源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:副图
主力持仓上穿小股民筹码,主升浪买进,一路持有.十次八次成功,配合均线.主筹达到90%散筹方向向下,说明主力已高度控盘筹码大部分锁定,等待主升浪
通达信指标公式源码:
主力持仓:EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLORFF00FF,LINETHICK2;指数趋势:EMA(100*(INDEXC-LLV(INDEXL,34))/(HHV(INDEXH,34)-LLV(INDEXL,34)),3),COLORFFAA66,LINETHICK3;
强弱分界:80,COLORYELLOW;
主力筹码集中度:WINNER(C)*100,COLORRED,LINETHICK2;
散筹筹码集中度:(WINNER(C*1.1)-WINNER(C*0.9))*100
,COLORGREEN,LINETHICK2;
VAR1:=(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*200-110;
散户:SMA(VAR1,8,1);
VAR2:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*200-100;
主力:SMA(SMA(VAR2,5,1),3,1);
VARF:=(2*CLOSE+HIGH+LOW)/4;
VAR12:=EMA((VARF-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,6);
VAR13:=EMA(0.667*REF(VAR12,1)+0.333*VAR12,4);
CD1:IF(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3ANDCOUNT(VAR12>VAR13,3)ANDREF(LOW,1)=LLV(LOW,120)ANDCLOSE>OPEN,1,0),52,0),COLORFF00FF;
VAR18:=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);
CD2:IF(CROSS(VAR18,3),52,0),COLORRED;
VARE:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
TD:IF(CROSS(84,VARE),(-1)*VARE,0),COLORGREEN;
HSL:=100*VOL/CAPITAL;
TD2:IF(REF(0.34*HSL,1)>4ANDREF(0.34*HSL,1)<4.2,-60,0),COLORF0F000;
0,COLOR888888;
A:=DRAWLINE(LOW<=LLV(LOW,120),LOW,HHV(H,6)<=HHV(H,10),LLV(LOW,6),1),COLORBLUE,LINETHICK2;
TY:=C;
成本:=(ma(CLOSE,60)+MA(CLOSE,70)+MA(CLOSE,90)+MA(CLOSE,108))/4,COLORRED,LINETHICK2;
MA0:MA(C,0)COLORYELLOW,LINETHICK2;
K:=(C+H+L)/3;
D:=MA(K,4);
阻力:=HHV(D,55),COLORYELLOW,LINETHICK2;
顶部:=HHV(H*0.98,55)COLORFFFFFF,LINETHICK2;
DRAWTEXT(REF(C,1)<DANDC>DANDD<REF(D,1),L*0.98,’D’),COLORYELLOW,LINETHICK2;
{均线}
TYP:=(HIGH+LOW+2*C)/4;
均线:=EMA(TYP,3),LINETHICK2,COLORWHITE;
均线上轨:=HHV(均线,14),LINETHICK2,COLORYELLOW;
均线下轨:=LLV(均线,14),LINETHICK2,COLORGREEN;
角度:=ATAN((均线/REF(均线,1)-1)*100)*180/3.1416;
{k线优化}
stICKLINE(角度>0,O,C,0.5,0),COLORRED;
STICKLINE(角度<0,O,C,0.5,0),COLORCYAN;
STICKLINE(角度<0,O,C,3,0),COLORFF6600;{蓝K线持币}
STICKLINE(角度<0,O,C,2,0),COLORFF9900;
STICKLINE(角度<0,O,C,1.2,0),COLORFFCC00;
STICKLINE(角度<0,O,C,0.2,0),COLORCYAN;
STICKLINE(角度>0,O,C,3,0),COLOR000099;
STICKLINE(角度>0,O,C,2,0),COLOR0000CC;{红K线持股}
STICKLINE(角度>0,O,C,1.3,0),COLOR0000FF;
STICKLINE(角度>0,O,C,0.3,0),COLORCC66FF;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
mtm:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(Abs(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDcrOSS(DX,MA(DX,2)),1,0);
DRAWICON(FILTER(买=1,5),L*0.97,23);
EMA5:EMA(C,5);EMA34:EMA(C,34);
KS:=(1-C/SMA(C,13,1))*100;RKS:=REF(KS,1);
MLS:=RKS/KS>1.23ANDRKS>10ANDC/REF(C,1)>1.02;
超跌:STICKLINE(KS>=10,H,L,0,1),COLORWHITE,LINETHICK2;
反弹:STICKLINE(MLS=1,H,L,0,1),COLORMAGENTA,LINETHICK2;
牛线:EMA(C,13)COLORRED,LINETHICK2;
熊线:EMA(KS*C/100+牛线,3)COLORBLUE,LINETHICK2;
量倍:=1.3;
M:=10;
R:=1;
幅差:=30;
{前平台}
TY:=CLOSE;
A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BacKSET(B1,10+1);HD:=FILTER(C1,10);
A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);
前期高位:=REF(HIGH,BArslAst(HD));
前期低位:=REF(LOW,BARSLAST(LD));
价踩前低:=crOSS(C,前期低位)ORCROSS(L,前期低位)ORCROSS(H,前期低位)ORCROSS(O,前期低位);
高低幅:=Abs((前期高位-前期低位)/前期低位)*100<幅差;
{突破前高收阳并放量量倍:=1,10,1.2;}
收阳放量:=C>OANDV>REF(V,1)*量倍;
{macd金叉或金叉极域}
DIF:=Ema(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
金叉:=CROSS(DIF,DEA)ANDDIF<=MANDDEA<=M;
{DIF在DEA上下极近区域即刚过金叉或即将金叉}
极域1:=ABS(DIF-DEA)/DEA<R/1000ANDDIF>REF(DIF,1);
金叉极域:=金叉OR极域1;
{价上穿或回踩M1均线[缺省为5日均线]}
M1:=MA(C,5);
价穿均线:=CROSS(C,M1);
价踩均线:=LOW-M1>=-0.05ANDLOW-M1<=0.05ORABS(C-M1)/M1<0.005;{回踩N1日均线}
上穿下踩:=价穿均线OR价踩均线;
前低反弹1:价踩前低AND高低幅AND收阳放量AND金叉极域AND上穿下踩;
[源码注释]通达信公式动态翻译结果
N赋值:1
DIF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIF的9日指数移动平均
MACD赋值:(DIF-DEA)*2
A1赋值:DIF>0并且DEA>0
输出XG:统计N日中满足DEA上穿DIF的天数并且A1
评论(0)