通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信建仓指标公式
VAR2:=1/WINNER(CLOSE);
VAR3:=MA(CLOSE,13);
VAR4:=100-ABS((CLOSE-VAR3)/VAR3*100);
VAR5:=LLV(LOW,75);
VAR6:=HHV(HIGH,75);
VAR7:=(VAR6-VAR5)/100;
VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);
VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);
VARA:=3*VAR8-2*SMA(VAR8,15,1);
VARB:=3*VAR9-2*SMA(VAR9,15,1);
VARC:=100-VARB;
主⼒仓位:(100-VARA),COLORRED,LINETHICK3;
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 30
ANDVAR11-CLOSE =-0.25ANDVAR15 22ANDVAR16 28ANDVAR17
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);
STICKLINE(VAR20,0,80,5,0),LINETHICK5,COLORRED;
DRAWTEXT(CROSS(VAR20,0.5)ANDCOUNT(VAR20=1,10)=1,95, 主⼒建仓! ),LINETHICK7,
COLORRED;
筹码集中:100*(1-WINNER(CLOSE)),COLORLIGRAY,LINETHICK2;
天堂:100,COLORBLUE;
V6:=CLOSE/REF(CLOSE,3) =1.1;
V7:=BACKSET(V6,3);
买:IF((V7ANDCOUNT(V7,3)=1),50,0),COLORMAGENTA,LINETHICK2;
DRAWTEXT(买,50, 买 ),COLORMAGENTA;
V10:=PEAKBARS(3,15,1) V12:=IF(V10=1,50,0);
头部:=IF(V12=50,100,0);
卖:IF(头部 REF(头部,1),50,0),COLORGREEN,LINETHICK2;DRAWTEXT(卖,50, ⾼顶出货
),COLORGREEN;
V9:=TROUGHBARS(3,15,1)
V11:=IF(V9=1,50,0);
底部:=IF(V11=50,50,0);
买2:IF(底部 REF(底部,1),40,0),COLORYELLOW,LINETHICK3;
DRAWTEXT(买,40, 主⼒ ),COLORYELLOW;
拉升筹码:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLORLIMAGENTA,LINETHICK2;
B:=ZIG(3,50/5)*1;
G:=MA(B,2);
D:=CROSS(B,G)*10;
W:=CROSS(G,B)*10;
DRAWTEXT(W=10,0.1, ↓跌势确⽴ ),COLORGREEN,;
DRAWTEXT(D=10,0.1, ▲涨势确⽴ ),COLORYELLOW;
VAR2A:=REF(LOW,1);
VAR3A:=SMA(ABS(LOW-VAR2A),3,1)/SMA(MAX(LOW-VAR2A,0),3,1)*100;
VAR4A:=EMA(IF(CLOSE*1.3,VAR3A*10,VAR3A/10),3);
VAR5A:=LLV(LOW,30);
VAR6A:=HHV(VAR4A,30);
VAR7A:=IF(MA(CLOSE,58),1,0);
VAR8A:=EMA(IF(LOW =VAR5A,(VAR4A+VAR6A*2)/2,0),3)/618*VAR7A;
VAR9A:=IF(VAR8A 100,100,VAR8A);
STICKLINE(VAR9A -150,0,VAR9A,3,0),COLORFF00FF;
底部吸筹指标:(CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100,COLOR00FF00;
STICKLINE(CROSS(底部吸筹指标,-24),100,0,6,0),COLORFFFFFF;
先知:(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100,COLORFF00FF;
可能放量拉升:IF(CROSS(底部吸筹指标,-24),1,0),COLORFFFFFF;
获利:STICKLINE(REF( KDJ.J ,1) 0AND KDJ.J 0,60,0,2,0),COLOR0000FF;
强弱分界线:50;
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),LINETHIC
K2,COLORRED;
大机构仓位:100*(1-WINNER(CLOSE)),COLORRED,LINETHICK3;
VAR211:=1/WINNER(CLOSE);
VAR311:=MA(CLOSE,13);
VAR4:=100-ABS((CLOSE-VAR311)/VAR311*100);
VAR5:=LLV(LOW,120);
VAR6:=HHV(HIGH,120);
VAR7:=(VAR6-VAR5)/100;
VAR8:=SMA((CLOSE-VAR5)/VAR7,20,1);
VAR9:=SMA((OPEN-VAR5)/VAR7,20,1);
VARA:=3*VAR8-2*SMA(VAR8,10,1);
VARB:=3*VAR9-2*SMA(VAR9,10,1);
VARC:=100-VARB;
基金仓位:(100-VARA),COLORYELLOW,LINETHICK2;
VARE1:=REF(LOW,1)*0.9;
VARF1:=LOW*0.9;
VAR101:=(VARF1*VOL+VARE1*(CAPITAL-VOL))/CAPITAL;
VAR111:=EMA(VAR101,30);
VAR121:=CLOSE-REF(CLOSE,1);
VAR131:=MAX(VAR121,0);
VAR141:=ABS(VAR121);
VAR151:=SMA(VAR131,7,1)/SMA(VAR141,7,1)*100;
VAR161:=SMA(VAR131,13,1)/SMA(VAR141,13,1)*100;
VAR171:=BARSCOUNT(CLOSE);
VAR181:=SMA(MAX(VAR121,0),6,1)/SMA(ABS(VAR121),6,1)*100;
VAR191:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
VAR1A1:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1B1:=SMA((SMA(VAR1A1,4,1)-50)*2,3,1);
VAR1C1:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR1D:=SMA(VAR1C1,4,1);
VAR1E:=SMA(VAR1D,3,1);
VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR20:=VAR181 =25ANDVAR191 -95ANDVAR1F 20ANDVAR1B1 -30AND
VAR1E 30ANDVAR111-CLOSE =-0.25ANDVAR151 22ANDVAR161 28AND
VAR171
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);
STICKLINE(VAR20,0,80,2,0),LINETHICK2,COLORBLUE;
DRAWTEXT(CROSS(VAR20,0.5)ANDCOUNT(VAR20=1,10)=1,90, 超级主力建仓! ),
COLORRED;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-
LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-
LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF REF(VAR10,1)ANDVOL REF(VOL,1)ANDCLOSE REF(CLOSE,1);
DRAWTEXT(VAR11ANDCOUNT(VAR11,30)=1,70, 大进场
),LINETHICK1,COLORLIMAGENTA;
STICKLINE(VAR11ANDCOUNT(VAR11,30)=1,1,60,5,0),COLORLIMAGENTA,LINETHICK4;
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);
V4:=2*(V2-V3)*5.5;
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V71:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V91:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V91,3);
VB:=(V91-VA)/2;
V111:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((CLLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
V121:=(EMA(V111,3)-REF(EMA(V111,3),1))/REF(EMA(V111,3),1)*100;
准备现金:STICKLINE(EMA(V111,3) =13,0,15,5,0),COLORLIRED;
AA:=(EMA(V111,3) =13)ANDFILTER((EMA(V111,3) =13),15);
DRAWTEXT(AA,-10, 准备现金 ),COLORLIRED;
买入股票:STICKLINE(EMA(V111,3) =13ANDV121 13,0,50,5,0),LINETHICK3,COLORRED;
BB:=(EMA(V111,3) =13ANDV121 13)ANDFILTER((EMA(V111,3) =13AND
V121 13),10);
DRAWTEXT(BB,60, 主力进 ),COLORWHITE;
卖临界:STICKLINE(EMA(V111,3) 60AND
EMA(V111,3) REF(EMA(V111,3),1),100,95,15,1),COLORGREEN;
CC:=(EMA(V111,3) =90ANDV121)ANDFILTER((EMA(V111,3) =90ANDV121),10);
DD:=(EMA(V111,3) =120ANDV121)ANDFILTER((EMA(V111,3) =120ANDV121),10);
STICKLINE(IF(VB =0,VB,0)ANDEMA(V111,3) 13,0,15,5,0),COLORLIRED;
STICKLINE(IF(VB =0,VB,0)ANDEMA(V111,3) 90,0,10,10,0),COLORGREEN;
STICKLINE(IF(V4 =0,V4,1)ANDEMA(V111,3) 13,0,15,5,0),COLORLIRED;
STICKLINE(IF(V4 =0,V4,1)ANDEMA(V111,3) 90,0,10,10,0),COLORLIBLUE,LINETHICK1;
DRAWTEXT(CC,20, 主力减仓 ),COLORLIBLUE;
V10:=PEAKBARS(3,15,1)
V12:=IF(V10=1,50,0);
头部:=IF(V12=50,100,0);
卖:IF(IF(V12=50,100,0) REF(IF(V12=50,100,0),1),40,0),COLORGREEN,LINETHICK3;
DRAWTEXT(卖,50, 主力清仓 ),COLORGREEN;
V92:=TROUGHBARS(3,15,1) V11:=IF(V92=1,50,0);
底部:=IF(V11=50,50,0);
买:IF(底部 REF(底部,1),40,0),COLORRED,LINETHICK4;
DRAWTEXT(买,50, 主力抄底 ),COLORRED;
V7:=TROUGHBARS(3,15,1) V9:=IF(V7=1,50,0);
AA1:=(O+H+L+C)/4;
BB1:=MA(AA1,3);
CC1:=SUM(IF(AA REF(AA,1),AA*VOL,0),4)/SUM(IF(AA REF(AA,1),AA*VOL,0),4);
DD1:=REF(100-(100/(1+CC)),1);
A1:=HHV(AA,10);
A2:=LLV(AA,30);
A3:=A1-A2;
A4:=EMA((AA-A2)/A3,1)*100;
B1:=HHV(AA,16);
B2:=LLV(AA,90);
B3:=B1-B2;
B4:=EMA((AA-B2)/B3,1)*100;
C1:=HHV(AA,30);
C2:=LLV(AA,240);
C3:=C1-C2;
C4:=EMA((AA-C2)/C3,1)*100;
:B4,COLORMAGENTA,LINETHICK2;
STICKLINE(A4 90ANDB4 70,86,94,6,0),COLORYELLOW;
DRAWTEXT((A4 90ANDB4 70)=1,85, 拉 ),COLORYELLOW;
D:=CROSS(ZIG(3,50/5)*1,MA(ZIG(3,50/5)*1,2))*1,COLORRED;
W:=CROSS(MA(ZIG(3,50/5)*1,2),ZIG(3,50/5)*1)*1,COLORBLUE;
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR2:=LLV(LOW,34);
VAR3:=HHV(HIGH,34);
多:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,13),COLORRED,LINETHICK2;
空:EMA(多,3),COLORGREEN,LINETHICK1;
DRAWTEXT(W=1,多*-0.1, ▼下跌确立 ),COLORGREEN;
DRAWTEXT(D=1,多*-0.31, ▲上涨确立 ),COLORRED;
爆发线:80,COLORRED;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13 =150ANDVAR13 200ANDVAR14 =150ANDVAR14 200,10,0);
VAR16:=IF(VAR13 =-150ANDVAR13 -200ANDVAR14 =-150ANDVAR14 -200,-
10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18 90,VAR18,100);
VAR1A:=IF(VARE 0,VARE,0);
VAR1B:=IF(VAR14 =200ANDVAR13 =150,15,IF(VAR14 =-200ANDVAR13 =-150,-
15,VAR16))+60;
VAR1C:=VAR1A 48ANDVAR1B 60ANDVAR19
DRAWTEXT(VAR1CANDCOUNT(VAR1C,30)=1,60, 大资金出货
),LINETHICK1,COLORFFCC66;
STICKLINE(VAR1CANDCOUNT(VAR1C,30)=1,0,50,5,0),COLORFFCC66,LINETHICK3;