通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、机构大户中户散户指标公式
换手:=V*100/CAPITAL;
主力:=MA(换手,4);
大户:=MA(换手,9);
中户:=MA(换手,17);
散户:=MA(换手,34);
均量:=(主力+大户+中户+散户)/4;
中户能量:=(中户-均量);
操盘:STICKLINE(中户能量>=0AND中户能量>=REF(中户能量,1),0,中户能量,4,0),COLORFF00FF;
减仓:STICKLINE(中户能量>=0AND中户能量<REF(中户能量,1),0,中户能量,4,0),COLORFF00FF;
反弹:STICKLINE(中户能量<0and中户能量>=REF(中户能量,1),0,中户能量,4,0),COLOR00FF00;
寻底:STICKLINE(中户能量<0AND中户能量<REF(中户能量,1),0,中户能量,4,0),COLOR00FF00;
N:=9;M1:=3;M2:=3;P:=9;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1),COLORRED,LINETHICK2;
D:=SMA(K,M2,1),COLOR00FF00;
JJ:=P*(3*D-2*K),COLOR00FF00;
J:=((3*K)-(2*D));
MAIRU:=CROSS(K,D)ANDK<20;
MAICHU:=CROSS(D,K)ANDD>80;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
吸筹:STICKLINE(VAR9>-120,0,VAR9,6,1),COLORF00FF0;
快线:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,COLORFF937F;
慢线:SMA(快线,M1,1),COLORRED,LINETHICK2;
空:SMA(慢线,M2,1),COLOR00FF00;
牛股:IF(BARSLAST(CROSS(慢线,空))<PANDBARSLAST(CROSS(空,慢线))<PANDCROSS(慢线,空)AND慢线<20,90,0),STICK,COLORFF937F;
STICKLINE(牛股,0,90,6,1),LINETHICK4,STICK,COLORFF937F;
BB:=IF(BARSLAST(CROSS(慢线,快线))>=3ANDCROSS(快线,慢线)AND慢线<30,20,0);
买:STICKLINE(BB,0,20,7,1),COLORYELLOW;
AA:=IF(BARSLAST(CROSS(快线,慢线))>=4ANDCROSS(慢线,快线)AND快线>50,20,0);
卖:STICKLINE(AA,80,100,7,1),COLOR00FF00;
换手:=V*100/CAPITAL;
主力:=MA(换手,4);
大户:=MA(换手,9);
中户:=MA(换手,17);
散户:=MA(换手,34);
均量:=(主力+大户+中户+散户)/4;
大户能量:(大户-均量),COLOR00FFFF;
操盘:STICKLINE(大户能量>=0AND大户能量>=REF(大户能量,1),0,大户能量,4,0),COLORRED;
减仓:STICKLINE(大户能量>=0AND大户能量<REF(大户能量,1),0,大户能量,4,0),COLORRED;
反弹:STICKLINE(大户能量<0and大户能量>=REF(大户能量,1),0,大户能量,4,0),COLORGREEN;
寻底:STICKLINE(大户能量<0AND大户能量<REF(大户能量,1),0,大户能量,4,0),COLORGREEN;
0,POINTDOT,COLORWHITE;
中户能量:(中户-均量),COLOR808000;
0,POINTDOT,COLORWHITE;
散户能量:(散户-均量),COLORGREEN;
0,POINTDOT,COLORWHITE;
主力能量:(主力-均量),COLORFFFFCC;
0,POINTDOT,COLORWHITE;
选股:CROSS(主力能量,大户能量);
M:=55;
N:=34;
LC:=REF(CLOSE,1);
SI:=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
DRAWTEXT(CROSS(85,RSI),75,'▼'),colorgreen;
VAR1:=IF(YEAR>=2038ANDMONTH>=1,0,1);
VAR2:=REF(LOW,1)*VAR1;VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100*VAR1;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3)*VAR1;
VAR5:=LLV(LOW,30)*VAR1;
VAR6:=HHV(VAR4,30)*VAR1;
VAR7:=IF(MA(CLOSE,58),1,0)*VAR1;
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*VAR1;
吸筹:IF(VAR8>100,100,VAR8)*VAR1,colorblack;
庄家吸筹:STICKLINE(吸筹>-150,0,吸筹,8,0),colorblack;
散户线:100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),colorwhite,LINETHICK1;RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);J:=3*K-2*D;
庄家线:EMA(J,6),colormagenta,LINETHICK2;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8);
走势线:CEILING(SMA(AA5,13,8))+4,coloryellow;
二、通达信主力大户中户散户指标
Var1:=1/WINNER(CLOSE);
Var2:=MA(CLOSE,13);
Var3:=100-ABS((CLOSE-Var2)/Var2*100);
Var4:=LLV(LOW,75);
Var5:=HHV(HIGH,75);
Var6:=(Var5-Var4)/100;
Var7:=SMA((CLOSE-Var4)/Var6,20,1);
Var8:=SMA((OPEN-Var4)/Var6,20,1);
Var9:=3*Var7-2*SMA(Var7,15,1);
VarA:=3*Var8-2*SMA(Var8,15,1);
VarB:=100-VarA;
VarC:=IF(900101<DATEANDDATE<99991230,1,0);
看我实力:(100-Var9)*VarC;
散户区:MA(WINNER(CLOSE*0.95)*100,3)*VarC,COLORYELLOW;
新庄区:(100-IF(Var1>5,IF(Var1<100,Var1,Var3-10),0))*VarC,COLORGREEN;
VarD:=散户区>Var3;
VarE:=REF(LOW,1)*0.9;
VarF:=LOW*0.9;
Var10:=(VarF*vol+VarE*(CAPITAL-VOL))/CAPITAL;
Var11:=EMA(Var10,30);
Var12:=CLOSE-REF(CLOSE,1);
Var13:=MAX(Var12,0);
Var14:=ABS(Var12);
Var15:=SMA(Var13,7,1)/SMA(Var14,7,1)*100;
Var16:=SMA(Var13,13,1)/SMA(Var14,13,1)*100;
Var17:=BARSCOUNT(CLOSE);
Var18:=SMA(MAX(Var12,0),6,1)/SMA(ABS(Var12),6,1)*100;
Var19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
Var1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
Var1B:=SMA((SMA(Var1A,4,1)-50)*2,3,1);
Var1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
Var1D:=SMA(Var1C,4,1);
Var1E:=SMA(Var1D,3,1);
Var1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
Var20:=Var18<=25ANDVar19<-95andvar1f>20ANDVar1B<-30ANDVar1E<30andvar11-close>=-0.25ANDVar15<22ANDVar16<28andvar17>50;
Var21:=(HIGH+LOW+CLOSE)/3;
Var22:=(Var21-MA(Var21,14))/(0.015*AVEDEV(Var21,14));
Var23:=(Var21-MA(Var21,70))/(0.015*AVEDEV(Var21,70));
Var24:=IF(Var22>=150ANDVar22<200andvar23>=150ANDVar23<200,10,0);
Var25:=IF(Var22<=-150andvar22>-200ANDVar23<=-150andvar23>-200,-10,Var24);
Var26:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
Var27:=REVERSE(Var26);
Var28:=SMA(Var26,3,1);
散户:SMA(Var28,3,1)*VarC;
新庄:SMA(散户,3,1)*VarC,COLORYELLOW;
地狱:IF(CROSS(散户,新庄)AND散户<30,新庄,0)*VarC,COLORRED;
天堂:IF(CROSS(新庄,散户)AND新庄>75,新庄,100)*VarC,COLORGREEN;
DRAWTEXT(CROSS(散户,新庄)AND散户<30,新庄,'逢低吸呐!'),COLORWHITE;
DRAWTEXT(CROSS(新庄,散户)AND新庄>75,新庄,'逢高减磅!'),COLORGREEN;
小心断裂:(IF(Var23>=200ANDVar22>=150,15,IF(Var23<=-200ANDVar22<=-150,-15,Var25))+50)*VarC;
DRAWTEXT(CROSS(Var20,0.5)ANDCOUNT(Var20=1,10)=1,35,'抄底'),COLORYELLOW;
DRAWTEXT(CROSS(VarD,0.5)ANDCOUNT(VarD=1,10)=1,65,'逃顶');
STICKLINE(VarD,100,25,1,0);
STICKLINE(1,散户区,0,1,0),COLORYELLOW;
STICKLINE(1,新庄区,100,1,0);
STICKLINE(Var20,0,80,1,0),COLORRED;
VAR1:=REF(LOW,1);
VAR2:=SMA(ABS(LOW-VAR1),3,1)/SMA(MAX(LOW-VAR1,0),3,1)*100;
VAR3:=EMA(IF(CLOSE*1.2,VAR2*10,VAR2/10),3);
VAR4:=LLV(LOW,38);
VAR5:=HHV(VAR3,38);
VAR6:=IF(LLV(LOW,90),1,0);
VAR7:=EMA(IF(LOW<=VAR4,(VAR3+VAR5*2)/2,0),3)/618*VAR6;
VAR8:=((C-LLV(L,21))/(HHV(H,21)-LLV(L,21)))*100;
VAR9:=SMA(VAR8,13,8);
底线:0,COLOR00FFFF;
主力吸货:VAR7,COLOR0000FF;
吸筹1:STICKLINE(VAR7,0,VAR7,6,0),COLOR0000FF;
吸筹2:STICKLINE(VAR7,0,VAR7,5,0),COLOR6600FF;
吸筹3:STICKLINE(VAR7,0,VAR7,4,0),COLORBB00FF;
吸筹4:STICKLINE(VAR7,0,VAR7,3,0),COLORFF00FF;
吸筹5:STICKLINE(VAR7,0,VAR7,2,0),COLORFF33FF;
吸筹6:STICKLINE(VAR7,0,VAR7,1,0),COLORFF66FF;
吸筹7:STICKLINE(VAR7,0,VAR7,0,0),COLORFF99FF;
风险:CEILING(SMA(VAR9,13,8)),LINETHICK2,COLORGREEN;
涨跌:MA(3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2*
SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1),5),LINETHICK2,COLORRED;
A:=V*100/CAPITAL;
主力:MA(A,4),COLORRED,POINTDOT;
游资:MA(A,9),COLORBLUE,POINTDOT;
大户:MA(A,17),COLORFF00FF,POINTDOT;
散户:MA(A,34),COLOR238E23,POINTDOT;
关注线:MA(A,180),COLORBLUE,LINETHICK1;
STICKLINE(主力>0,0,主力,1,0),COLORRED;
STICKLINE(游资>0,0,游资,1,0),COLORBLUE;
STICKLINE(大户>0,0,大户,1,0),COLORFF00FF;
STICKLINE(散户>0,0,散户,1,0),COLOR238E23;
[源码注释]通达信公式动态翻译结果
SJ赋值:1
输出严重超买:100*SJ,画红色,DOTLINE
输出超买:80,画红色,DOTLINE
输出超卖:20,COLOR00FF00,DOTLINE
输出严重超卖:0*SJ,COLOR00FF00,DOTLINE
输出MACD顶背:0,COLOR00FF00
输出MACD底背:0,画红色
输出KDJ顶背:0,COLORFFCC66
输出KDJ底背:0,COLORFF00FF
输出RSI顶背:0,COLORFFFFFF
输出RSI底背:0,画黄色
输出DMI顶背:0,画蓝色
输出DMI底背:0,COLOR0099FF
赋值: 最高价-最低价和最高价-1日前的收盘价的绝对值的较大值和最低价-1日前的收盘价的绝对值的较大值的14日累和
赋值: 最高价-1日前的最高价
赋值: 1日前的最低价-最低价
PDM赋值: 如果HD>0ANDHD>LD,返回HD,否则返回0的14日累和
MDM赋值: 如果LD>0ANDLD>HD,返回LD,否则返回0的14日累和
PDI赋值: PDM*100/TRR
MDI赋值: MDM*100/TRR
A1赋值:上次1日前的"平滑异同平均的DIF"(12,26,9)上穿"平滑异同平均的DEA"(12,26,9)距今天数*SJ
B1赋值:A1+1日前的收盘价>收盘价 AND A1+1日前的"平滑异同平均的DIF"(12,26,9)<"平滑异同平均的DIF"(12,26,9) AND "平滑异同平均的DIF"(12,26,9)上穿"平滑异同平均的DEA"(12,26,9)*SJ
A2赋值:上次1日前的"KDJ的K"(9,3,3)上穿"KDJ的D"(9,3,3)距今天数
B2赋值:A2+1日前的收盘价>收盘价 AND A2+1日前的"KDJ的K"(9,3,3)<"KDJ的K"(9,3,3) AND "KDJ的K"(9,3,3)上穿"KDJ的D"(9,3,3)*SJ
A3赋值:上次1日前的"RSI的RSI1"(6,12,24)上穿"RSI的RSI2"(6,12,24)距今天数
B3赋值:A3+1日前的收盘价>收盘价 AND A3+1日前的"RSI的RSI1"(6,12,24)<"RSI的RSI1"(6,12,24) AND "RSI的RSI1"(6,12,24)上穿"RSI的RSI2"(6,12,24)*SJ
C1赋值:上次1日前的"平滑异同平均的DEA"(12,26,9)上穿"平滑异同平均的DIF"(12,26,9)距今天数
D1赋值:C1+1日前的收盘价<收盘价 and="">"平滑异同平均的DIF"(12,26,9) AND "平滑异同平均的DEA"(12,26,9)上穿"平滑异同平均的DIF"(12,26,9)*SJ
C2赋值:上次1日前的"KDJ的D"(9,3,3)上穿"KDJ的K"(9,3,3)距今天数
D2赋值:C2+1日前的收盘价<收盘价 and="">"KDJ的K"(9,3,3) AND "KDJ的D"(9,3,3)上穿"KDJ的K"(9,3,3)*SJ
C3赋值:上次1日前的"RSI的RSI2"(6,12,24)上穿"RSI的RSI1"(6,12,24)距今天数
D3赋值:C3+1日前的收盘价<收盘价 and="">"RSI的RSI1"(6,12,24) AND "RSI的RSI2"(6,12,24)上穿"RSI的RSI1"(6,12,24)*SJ
C4赋值:上次1日前的MDI上穿PDI距今天数
D4赋值:收盘价+1日前的收盘价<收盘价 and="" mdi="">MDI AND MDI上穿PDI
A4赋值:上次1日前的PDI上穿MDI距今天数
B4赋值:A4+1日前的收盘价>收盘价 AND A4+1日前的PDI<PDI AND PDI上穿MDI
当满足条件B4>0时,在5位置书写文字,COLOR0099FF
当满足条件D4>0时,在95位置书写文字,画蓝色
当满足条件B1>0时,在15位置书写文字,画红色
当满足条件B2>0时,在10位置书写文字*SJ,COLORFF00FF
当满足条件B3>0时,在18位置书写文字*SJ,画黄色
当满足条件D1>0时,在85位置书写文字*SJ,COLOR00FF00
当满足条件D2>0时,在90位置书写文字*SJ,COLORFFCC66
当满足条件D3>0时,在96位置书写文字*SJ,COLORFFFFFF
当满足条件B1>0时,在20和0位置之间画柱状线,宽度为0,0不为0则画空心柱.,画红色
当满足条件B2>0时,在20和0位置之间画柱状线,宽度为0,0不为0则画空心柱.,COLORFF00FF
当满足条件B3>0时,在20和0位置之间画柱状线,宽度为0,0不为0则画空心柱.,画黄色
当满足条件D1>0时,在80和100位置之间画柱状线,宽度为0,0不为0则画空心柱.,COLOR00FF00
当满足条件D2>0时,在100和80位置之间画柱状线,宽度为0,0不为0则画空心柱.,COLORFFCC66
当满足条件D3>0时,在100和80位置之间画柱状线,宽度为0,0不为0则画空心柱.,画白色
当满足条件B4>0时,在20和0位置之间画柱状线,宽度为0,0不为0则画空心柱.,COLOR0099FF
当满足条件D4>0时,在100和80位置之间画柱状线,宽度为0,0不为0则画空心柱.,画蓝色
VAR188赋值:((收盘价 – 34日内最低价的最低值)/(34日内最高价的最高值 – 34日内最低价的最低值))*(100)
VAR288赋值:VAR188的相反数
VAR388赋值:VAR188的9日[1日权重]移动平均
K88赋值:VAR388的3日[1日权重]移动平均*SJ
D88赋值:K88的3日[1日权重]移动平均*SJ
当满足条件(K88>=D88)时,在K88和D88位置之间画柱状线,宽度为1,0不为0则画空心柱.,COLOR0000FF
当满足条件(K88<=D88)时,在K88和D88位置之间画柱状线,宽度为1,0不为0则画空心柱.,COLOR00FF00
推荐阅读:散户机构庄家指标公式
ZT:=C>REF(C,1)*1.095ANDC=H;
A:=BARSLASTCOUNT(ZT);
T1:=BARSLAST(CROSS(A=1,0.5));
T3:=BARSLAST(CROSS(A=3,0.5));
TJ:=COUNT(CREF(L,T1);
TJ2:=COUNT(T3=0,T1+1)=1;
XG:=TJANDTJ2ANDT3<100;
STICKLINE(XG,C,O,2,0),COLORYELLOW;
DRAWICON(XG,L*0.95,1);
{
选股公式:
ZT:=C>REF(C,1)*1.095ANDC=H;
A:=BARSLASTCOUNT(ZT);
T1:=BARSLAST(CROSS(A=1,0.5));
T3:=BARSLAST(CROSS(A=3,0.5));
TJ:=COUNT(CREF(L,T1);
TJ2:=COUNT(T3=0,T1+1)=1;
XG:TJANDTJ2ANDT3<100;
M:=60;
N:=30;
散户线:100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
主力线:EMA(J,6),COLORRED;
VAR2:=REF(LOW,1);
VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100;
VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3);
VAR5:=LLV(LOW,30);
VAR6:=HHV(VAR4,30);
VAR7:=IF(MA(CLOSE,58),1,0);
VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;
VAR9:=IF(VAR8>100,100,VAR8);
吸筹:STICKLINE(VAR9>-120,0,VAR9,2,5),COLORMAGENTA;
AA3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10;
AA4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
AA5:=SMA(AA4,13,8);
走势:CEILING(SMA(AA5,13,8)),COLORFF00FF,LINETHICK2;
AA6:=SMA(AA3,21,8);
买观注:STICKLINE(走势-AA6<-65,0,7,15,1);
DRAWICON(FILTER(J>REF(J,1)AND走势>=REF(走势,1)AND走势<25,5),走势,3);
卖观注:STICKLINE(走势-AA6>85,98,90,15,1),COLORFFFF00;
DRAWICON(FILTER(J<REF(J,1)AND走势<=ref(走势,1)andj>85,5),J,6);
金叉:CROSS(主力线,散户线);
DRAWTEXT(金叉,主力线,'★'),COLORRED;
死叉:CROSS(散户线,主力线);
DRAWTEXT(死叉,散户线,'☆'),COLOR00F300;
VAR1:=IF((CLOSE>OPEN),((CLOSE-OPEN)*VOL),IF((CLOSE<OPEN),((CLOSE-OPEN)*VOL),0));
VAR2:=IF((CLOSE>REF(CLOSE,1)),((CLOSE-REF(CLOSE,1))*VOL),IF((CLOSE<REF(CLOSE,1)),((CLOSE-REF(CLOSE,1))*VOL),0));
VAR3:=IF((OPEN>REF(CLOSE,1)),((OPEN-REF(CLOSE,1))*VOL),IF((OPEN<REF(CLOSE,1)),((OPEN-REF(CLOSE,1))*VOL),0));
VAR4:=IF((CLOSEOPEN),((OPEN-CLOSE)*VOL),0));
VAR5:=IF((CLOSEREF(CLOSE,1)),((REF(CLOSE,1)-CLOSE)*VOL),0));
VAR6:=IF((OPENREF(CLOSE,1)),((REF(CLOSE,1)-OPEN)*VOL),0));
VAR7:=(CLOSE>OPEN);
VAR8:=(CLOSE>REF(CLOSE,1));
VAR9:=(OPEN>REF(CLOSE,1));
VARA:=((VAR7ORVAR8)ORVAR9);
机构:(SUM(((((VAR1+VAR2)+VAR3)/3)/CAPITAL),5)*1000),COLORYELLOW;
散户:(SUM(((((VAR4+VAR5)+VAR6)/3)/CAPITAL),10)*1000),COLORRED;
系数:EMA((((((((COUNT(VAR8,12)/12)+(COUNT(VAR7,12)/12))+(COUNT(VAR9,12)/12))/3)*MA(机构,5))*2)*1.1),2),COLORGREEN;
平衡:0,POINTDOT,COLORGREEN;
评论(0)