通达信指标公式源码概况:

指标类别: 通达信指标公式

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、庄家吸筹指标公式

  

DRAWGBK(O>C,RGB(160,32,240),RGB(56,94,15),0,'背景图',0);  

A01:=(WINNER((CLOSE*1))*100.000);  

A02:=(WINNER((CLOSE*1.1))*100.000);  

A03:=(WINNER((CLOSE*0.9))*100.000);  

A04:=MA(A03,5);  

A06:=(100-MA(A02,5));  

{STICKLINE(1,A06,MA(A02,5),2,1),COLORGREEN;}  

A08:=(MA(A02,5)-MA(A03,5));  

{STICKLINE(1,A04,MA(A02,5),2,1),COLORYELLOW;}  

A0A:=(((((HHV(A04,15)-A03)/A03)*100)>30)AND(HHV(A04,15)>50));  

STICKLINE(A0A,(0-2),2,2,1);  

STICKLINE(NOT(A0A),(0-2),2,2,1),COLORBLUE;  

STICKLINE(A03>REF(A03,1),0,A03,2,0),COLORRED;  

STICKLINE(A03<REF(A03,1),0,A03,2,1),COLORRED;  

获利:=MA(A03,1),COLORMAGENTA,DOTLINE;  

主力:MA(A03,10),COLORMAGENTA,LINETHICK2;  

套牢:=100-A02,COLORLIBLUE,DOTLINE;  

散户:(100.000-MA(A02,10)),COLORLIBLUE,LINETHICK2;  

浮动:=A02-A03,COLORLIRED,DOTLINE;  

游资:(MA(A02,10)-MA(A03,10)),COLORLIRED,LINETHICK2;  

STICKLINE(1,100,100,5,1),COLORGREEN;  

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,13);  

VAR6:=HHV(VAR4,13);  

VAR7:=IF(MA(CLOSE,34),1,0);  

VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;  

VAR9:=IF(VAR8>100,100,VAR8);  

吸筹:VAR9,LINETHICK2,COLORRED;  

STICKLINE(VAR9>-120,0,VAR9,8,1),COLORLIRED;  

短线:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,COLORMAGENTA,LINETHICK2;  

中线:SMA(短线,M1,1),COLORYELLOW;  

长线:SMA(中线,M2,1),COLORLIBLUE;  

超强吸筹:IF(BARSLAST(CROSS(中线,长线))<PANDCROSS(中线,长线)AND中线<20,90,DRAWNULL),STICK,COLORFF937F;  

STICKLINE(超强吸筹,0,90,1,1),COLORFF937F;  

BB:=IF(BARSLAST(CROSS(中线,短线))>=3ANDCROSS(短线,中线)AND中线<30,20,0);  

STICKLINE(BB,0,20,7,1),COLORYELLOW;  

DRAWICON(BB>0,10,1);  

AA:=IF(BARSLAST(CROSS(短线,中线))>=4ANDCROSS(中线,短线)AND短线>50,20,0);  

STICKLINE(AA,80,100,7,1),COLORWHITE;  

DRAWICON(AA>0,90,2);

image.png

二、庄家吸筹完毕指标公式

  

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,13);  

VAR6:=HHV(VAR4,13);  

VAR7:=IF(MA(CLOSE,34),1,0);  

VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7;  

VAR9:=IF(VAR8>100,100,VAR8);  

吸筹:VAR9,LINETHICK2,COLORRED;  

{STICKLINE(VAR9>-120,0,VAR9,8,1),COLORLIRED;}  

短线:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,COLORMAGENTA,LINETHICK2;  

中线:SMA(短线,M1,1),COLORYELLOW;  

长线:SMA(中线,M2,1),COLORLIBLUE;  

超强吸筹:=BARSLAST(CROSS(中线,长线))<PANDCROSS(中线,长线)AND中线<20;  

PARTLINE(BARSLAST(CROSS(中线,长线))<PANDCROSS(中线,长线)AND中线<20,90),COLORFF937F;  

STICKLINE(超强吸筹,0,90,1,1),COLORFF937F;  

BB:=IF(BARSLAST(CROSS(中线,短线))>=3ANDCROSS(短线,中线)AND中线<30,20,0);  

STICKLINE(BB,0,20,7,1),COLORYELLOW;  

DRAWICON(BB>0,10,1);  

AA:=IF(BARSLAST(CROSS(短线,中线))>=4ANDCROSS(中线,短线)AND短线>50,20,0);  

STICKLINE(AA,80,100,7,1),COLORWHITE;  

DRAWICON(AA>0,90,2);  

VAR1:=(VOL/(((HIGH-LOW)*2)-ABS((CLOSE-OPEN))));  

成交:=VOL;  

买盘:=IF((CLOSE>OPEN),(VAR1*(HIGH-LOW)),IF((CLOSE<OPEN),(VAR1*((HIGH-OPEN)+(CLOSE-LOW))),(VOL/2)));  

卖盘:=IF((CLOSE>OPEN),(0-(VAR1*((HIGH-CLOSE)+(OPEN-LOW)))),IF((CLOSE<OPEN),(0-(VAR1*(HIGH-LOW))),(0-(VOL/2))));  

买卖差:=(买盘+卖盘);  

STICKLINE((VOL>0),VOL,0,10,1),COLORFFFFFF;  

STICKLINE((买卖差>0),0,买卖差,10,0),COLOR0000FF;  

STICKLINE((买卖差<0),0,买卖差,5,0),LINETHICK3,COLOR33FF33;  

量比1:=(VOL/MA(VOL,5));  

VAR10:=买盘;  

VAR20:=卖盘;  

JX1:=BARSSINCE(买盘);  

JY1:=IF(((121>JX1)AND(JX1>0)),JX1,120);  

JY2:=IF(((4>JX1)AND(JX1>0)),JX1,3);  

VAR30:=MA(VOL,JY2);  

动神:=买盘;  

鬼力:=VAR20;  

神比:=(动神/VAR30);  

鬼比:=(鬼力/VAR30);  

VAR2:=(HIGH-LOW);  

VAR3:=ABS((OPEN-CLOSE));  

VAR4:=(HIGH-IF((CLOSE>OPEN),CLOSE,OPEN));  

VAR5:=(IF((CLOSE>OPEN),OPEN,CLOSE)-LOW);  

VAR6:=((VAR3/VAR2)*VOL);  

VAR7:=((VAR4/VAR2)*VOL);  

VAR8:=((VAR5/VAR2)*VOL);  

VAR9:=IF(((VOL/CAPITAL)>0.001),1,EXP(ABS(LOG(((VOL/CAPITAL)*100)))));  

VARA:=(((CLOSE-MA(CLOSE,5))/MA(CLOSE,5))*100);  

VARB:=(((MA(CLOSE,5)>MA(CLOSE,10))AND(MA(CLOSE,10)>MA(CLOSE,30)))AND(MA(CLOSE,30)>MA(CLOSE,60)));  

VARC:=((MA(CLOSE,5)<MA(CLOSE,10))AND(MA(CLOSE,10)<MA(CLOSE,30)));  

VARD:=REF(CLOSE,1);  

VARE:=((SMA(MAX((CLOSE-VARD),0),6,1)/SMA(ABS((CLOSE-VARD)),6,1))*100);  

VAR40:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),VAR6,动神)+动神)/2);  

VAR41:=((IF(((VAR7>VAR6)AND(VAR7>VAR8)),VAR7,动神)+动神)/2);  

VAR42:=((IF(((VAR8>VAR6)AND(VAR8>VAR7)),VAR8,动神)+动神)/2);  

VAR50:=((IF((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),VAR6,鬼力)+鬼力)/2);  

三日上攻:=MA((((VAR40+VAR41)+VAR42)/3),JY2);  

三日下攻:=MA(VAR50,JY2);  

STICKLINE((CLOSE>MA(CLOSE,30)),0,VOL,10,1),COLOR0000FF;  

STICKLINE((CLOSE<MA(CLOSE,30)),0,VOL,10,1),COLOR00FF00;  

STICKLINE((鬼力>0),鬼力,0,8,0),COLORFF3399;  

STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE>OPEN)),0,VAR6,10,0),COLOR00FFFF;  

STICKLINE((((VAR6>=VAR7)AND(VAR6>=VAR8))AND(CLOSE<OPEN)),0,VAR6,10,0),COLORFF0000;  

STICKLINE(((VAR8>VAR6)AND(VAR8>VAR7)),0,VAR8,10,0),COLORFFFFFF;  

STICKLINE(((VAR7>VAR6)AND(VAR7>VAR8)),0,VAR7,10,0),COLORFF00FF;  

STICKLINE(((VAR9>2)AND(VOL<(MA(VOL,5)/2))),0,VOL,6,0);  

MA1:=MA(COST(15),1);  

TJ:=BARSLAST(MA1<C);  

TJJ:=BARSLAST(MA1>C);  

建仓:SUM(V,TJ)/TJ/100,COLORBLUE;  

启动:SUM(V,TJJ)/TJJ/100,COLORGREEN;  

DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);  

DEA:=EMA(DIFF,9);  

MCD:=2*(DIFF-DEA),COLORSTICK;  

AG:=CROSS(DIFF,DEA);  

MACD1:=SUM(V,BARSLAST(AG)+1)/CAPITAL*200,COLORSTICK;  

操作:IF(DEA>REF(DEA,1)ANDDIFF>DEA,MACD1,0);

image.png

[源码注释]通达信公式动态翻译结果

BN赋值:20

C2赋值:收盘价的2日简单移动平均,线宽为0

MA10赋值:C2的10日简单移动平均,线宽为0

MA20赋值:C2的BN日简单移动平均,线宽为0

MA60赋值:C2的60日简单移动平均,线宽为0

BOLL赋值:MA20

UPPER赋值:BOLL+1.618*C2的BN日估算标准差,画绿色,线宽为0

LOWER赋值:BOLL-1.618*C2的BN日估算标准差,画绿色,线宽为0

C2上穿LOWER

推荐阅读:庄家吸筹选股公式

  

XA_1:=MA(CLOSE,20);  

XA_2:=REF(CLOSE,8)/REF(XA_1,8)<=0.82ORREF(CLOSE,15)/REF(XA_1,15)<=0.82;  

XA_3:=REF(CLOSE,1)/REF(CLOSE,2)>=1.08;  

XA_4:=CLOSE/REF(CLOSE,1)>1.03ANDCLOSE>=HHV(HIGH,20)*0.95;  

X5:XA_1ANDXA_2ANDXA_3ANDXA_4;  

n:=18;  

DRAWGBK(CLOSE>1,STRIP(RGB(0,150,150),RGB(0,20,20),0));  

VAR2:=(HIGH+LOW+(CLOSE)*(2))/(4);  

B:((EMA((VAR2-LLV(VAR2,15))/(HHV(LOW,15)-LLV(VAR2,15)),2))*(38)),COLOR0000FF,LINESTICK;  

VAR22:=((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10)))*(100);  

VAR33:=EMA(VAR22,10);  

VAR44:=EMA(VAR33,10);  

VAR55:=(3)*(VAR33)-(2)*(VAR44);  

VAR66:=EMA(VAR55,5);  

a:(EMA(VAR66,1)),COLOR0000FF,LINETHICK3;  

Vur1:=VOL/CAPITAL;  

Vur2:=1.1*(MAX(HIGH,REF(CLOSE,1))/MIN(LOW,REF(CLOSE,1))-1);  

Vur3:=2.5*MAX(Vur1,Vur2);  

Vur4:=DMA(CLOSE,Vur3);  

Vur5:=20*(Vur4/REF(Vur4,1)-1)*48;  

Vur6:=EMA(Vur5,2);  

红黄极强:STICKLINE(Vur5>0,0,Vur5,7,0),COLOR0077FF;  

STICKLINE(Vur5>0,0,Vur5,6,0),COLOR0088FF;  

STICKLINE(Vur5>0,0,Vur5,5,0),color00AAFF;  

STICKLINE(Vur5>0,0,Vur5,4,0),color00BBFF;  

STICKLINE(Vur5>0,0,Vur5,3,0),color00CCFF;  

STICKLINE(Vur5>0,0,Vur5,2,0),color00DDFF;  

STICKLINE(Vur5>0,0,Vur5,1,0),color00EEFF;  

红强势:STICKLINE(Vur6>0,0,Vur6,7,0),COLOR000066;  

STICKLINE(Vur6>0,0,Vur6,6,0),COLOR000088;  

STICKLINE(Vur6>0,0,Vur6,5,0),COLOR0000AA;  

STICKLINE(Vur6>0,0,Vur6,4,0),COLOR0011BB;  

STICKLINE(Vur6>0,0,Vur6,3,0),COLOr0022CC;  

STICKLINE(Vur6>0,0,Vur6,2,0),COLOR0033DD;  

STICKLINE(Vur6>0,0,Vur6,1,0),COLOR0044EE;  

绿蓝极弱:STICKLINE(Vur5<0,0,Vur5,6.6,0),COLORff4400;  

STICKLINE(Vur5<0,0,Vur5,6,0),COLORff5500;  

STICKLINE(Vur5<0,0,Vur5,5,0),COLORFF6611;  

STICKLINE(Vur5<0,0,Vur5,4,0),COLORFF8822;  

STICKLINE(Vur5<0,0,Vur5,3,0),COLORFFaa33;  

STICKLINE(Vur5<0,0,Vur5,2,0),COLORFFbb44;  

STICKLINE(Vur5<0,0,Vur5,1,0),COLORFFcc55;  

绿弱势:STICKLINE(Vur6<0,0,Vur6,7,0),color004400;  

STICKLINE(Vur6<0,0,Vur6,6,0),color006600;  

STICKLINE(Vur6<0,0,Vur6,5,0),color008800;  

STICKLINE(Vur6<0,0,Vur6,4,0),color00aa00;  

STICKLINE(Vur6<0,0,Vur6,3,0),color00bb00;  

STICKLINE(Vur6<0,0,Vur6,2,0),color00cc00;  

STICKLINE(Vur6<0,0,Vur6,1,0),color00dd00;  

VAb:=EMA(EMA(CLOSE,5),5);  

控盘:=(VAb-REF(VAb,1))/REF(VAb,1)*1000;  

VAc:=100*WINNER(CLOSE*0.95);  

粉上天:STICKLINE(VAc>30ANDCOST(85)0,控盘,0,7,0),COLORFF00FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,6,0),COLORFF22FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,5,0),COLORFF44FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,4,0),COLORFF66FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,3,0),COLORFF88FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,2,0),COLORFF99FF;  

STICKLINE(VAc>30ANDCOST(85)0,控盘,0,1,0),COLORFFBBFF;  

e:=EMA(CLOSE,12)-EMA(CLOSE,26);  

f:=EMA(e,n);  

if(e<0,e,0)*30,colorred,linethick2;  

if(e<0,0,e)*30,coloryellow,linethick2;  

if(e<f,e,f)*30,COLOR00ff00,linethick2;  

if(e>f,f,f)*30,COLORwhite,linethick2;  

金叉:=CROSS(e,f)ANDe<-0.1;  

STICKLINE(金叉,0,-40.18,1,0),COLORred;  

DRAWTEXT(金叉,-32,'金叉'),COLORYELLOW;  

JCCOUNT:=COUNT(CROSS(e,f),BARSLAST(f>=0));  

二次金叉:=CROSS(e,f)ANDf<0ANDCOUNT(JCCOUNT=2,21)=1;  

STICKLINE(二次金叉,0,-20,1,0),Color222233;  

DRAWTEXT(二次金叉,-15,'二次金叉'),Color222233;  

u:100*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60)),colorblack,linethick2;  

w:=ema(u,3);  

FILLRGN(u,w,u>ref(u,1),rgb(0,105,0),u<ref(u,1),rgb(105,0,0));  

d:80,COLORff4444,linethick2;  

DRAWTEXTREL(10,d+60,'进出准备线'),COLORff4444;  

x:95,colorgreen,linethick1;  

DRAWTEXTREL(10,x-20,'时尚流行进出线'),colorgreen;  

110;  

VARA1:=((CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)>=REF(CLOSE,2))AND(REF(CLOSE,1)<=REF(CLOSE,3))AND(REF(CLOSE,2)<=ref(close,3))and((ref(close,4)>REF(CLOSE,2))OR(REF(CLOSE,4)<=ref(close,2))and(ref(close,5)>=REF(CLOSE,3)))OR(CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)<=ref(close,2))and(close>=REF(CLOSE,2))AND((REF(CLOSE,3)>REF(CLOSE,1))OR(REF(CLOSE,3)<=ref(close,1))and(ref(close,4)>=REF(CLOSE,2))));  

VARA2:=LLV(LOW,5);  

VARA3:=HHV(HIGH,5);  

VARA4:=EMA(((CLOSE-VARA2)/(VARA3-VARA2))*(100),4);  

VARA5:=EMA((0.66699999)*(REF(VARA4,1))+(0.333)*(VARA4),2);  

VARA6:=(VARA5<24)AND(OPEN<MA(CLOSE,20));  

VARA1AND(VARA6),COLORFF0000;  

STICKLINE(VARA1AND(VARA6),0,79.5,7,0),COLORff1111;  

STICKLINE(VARA1AND(VARA6),0,79.5,6,0),COLORff2222;  

STICKLINE(VARA1AND(VARA6),0,79.5,5,0),COLORFF3333;  

STICKLINE(VARA1AND(VARA6),0,79.5,4,0),COLORFF4444;  

STICKLINE(VARA1AND(VARA6),0,79.5,3,0),COLORFF5555;  

STICKLINE(VARA1AND(VARA6),0,79.5,2,0),COLORFF6666;  

STICKLINE(VARA1AND(VARA6),0,79.5,1,0),COLORFF7777;  

Vr10:=IF(TROUGHBARS(3,16,1)=0ANDHIGH>LOW+0.04,4,0);  

q:Vr10,colorred;  

DRAWICON(Vr10,u+10,1);  

STICKLINE(q,0,30,8,0),colorblack;  

DRAWTEXT(q,40,'买100%'),coloryellow;  

m1:=3;  

m2:=3;  

95,COLOR0000FF;  

-10,COLORFFFF00;  

REFLINE:-10,20,50,80,110;  

RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;  

K:EMA(RSV,M1);  

D:EMA(K,M2);  

J:=(3*K-2*D);  

火山:IF(J<=0,20,0),LINETHICK0;  

STICKLINE(J<=0,90,100,8,0),COLORRED;  

KDJ1:=REF(COUNT(J=3,1)ANDREF(J,1)<20;  

KDJ2:=J>REF(J,1);  

反转:IF(FILTER(KDJ1ANDKDJ2,3),50,0),COLORFFFF00;  

VAR22:=REF(LOW,1);  

VAR33:=SMA(ABS(LOW-VAR22),3,1)/SMA(MAX(LOW-VAR22,0),3,1)*100;  

VAR44:=EMA(IF(CLOSE*1.3,VAR33*10,VAR33/10),3);  

VAR55:=LLV(LOW,13);  

VAR66:=HHV(VAR44,13);  

VAR77:=IF(MA(CLOSE,34),1,0);  

VAR888:=EMA(IF(LOW<=VAR55,(VAR44+VAR66*2)/2,0),3)/618*VAR77;  

VAR999:=IF(VAR888>100,100,VAR888);  

吸筹:VAR999,LINETHICK1,COLORCD7F32;  

STICKLINE(VAR999>-120,0,VAR999,2,10),COLORFF00FF;

image.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。