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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、主力建仓副图指标公式

  

N1=9;  

M1=3;  

M2=3;  

P1=9;  

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

K:=SMA(RSV,M1,1),COLOR000000;  

D:=SMA(K,M2,1),COLOR000000;  

JJ:=P1*(3*D-2*K),COLOR000000;  

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

大宗:=(L2_AMO(0,2)+L2_AMO(1,2)-L2_AMO(0,3)-L2_AMO(1,3))/10000.0,COLOR00BBFF;  

主力:=(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/10000.0,COLORRED;  

超大:=(L2_AMO(0,2)-L2_AMO(0,3))/10000,COLORYELLOW;  

游资:大宗-REF(大宗,1)COLORREDNODRAW;  

主力1:主力-REF(主力,1)COLORMAGENTANODRAW;  

散户:超大-REF(超大,1)COLORLIREDNODRAW;  

STICKLINE(游资>0,0,游资,1,0)COLORRED;  

STICKLINE(游资<0,0,游资,1,0)COLORGREEN;  

STICKLINE(主力1>0,-3000,主力1-3000,1,0)COLORMAGENTA;  

STICKLINE(主力1<0,-3000,主力1-3000,1,0)COLORYELLOW;  

STICKLINE(散户>0,-6000,散户-6000,1,0)COLORLIRED;  

STICKLINE(散户<0,-6000,散户-6000,1,0)COLORLIGREEN;  

游:REF(游资,4)+REF(游资,3)+REF(游资,2)+REF(游资,1)+游资NODRAW;  

主:REF(主力1,4)+REF(主力1,3)+REF(主力1,2)+REF(主力1,1)+主力1NODRAW;  

散:REF(散户,4)+REF(散户,3)+REF(散户,2)+REF(散户,1)+散户NODRAW;  

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,COLORBLU  

E;  

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<200AND  

VAR14>=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<100;  

DRAWTEXT(VAR1CANDCOUNT(VAR1C,30)=1,60,'大资金出  

货'),LINETHICK1,COLORFFCC66;  

STICKLINE(VAR1C  

COUNT(VAR1C,30)=1,0,50,5,0),COLORFFCC66,LINETHICK3;

image.png

二、主力建仓主图指标公式

  

A5:=MA(C,5);  

MA10:=MA(C,10);  

MA20:=MA(C,20);  

MA60:=MA(C,60);  

MA120:=MA(C,120);  

MA250:=MA(C,250);  

AHC1:=CLOSE*VOL;  

AHC2:=EMA((EMA(AHC1,3)/EMA(VOL,3)+EMA(AHC1,6)/EMA(VOL,6)+EMA(AHC1,12)/EMA(VOL,12)+EMA(AHC1,24)/EMA(VOL,24))/4,13);  

ZT:=REF(C,1)*1.1-C<0.01ANDH=C;  

顶:=1.3*AHC2;  

内上:=1.06*AHC2;  

内下:=AHC2*0.94;  

底:=AHC2*0.87;  

XX:MA250>内下ANDMA120>内下ANDMA60>内下ANDMA20>内下ANDMA10>内下ANDMA5>内下  

ANDMA250<内上ANDMA120<内上ANDMA60<内上ANDMA20<内上ANDMA10<内上ANDMA5<内上;  

⽜启动:CROSS(C,内上)ANDXX;  

STICKLINE(⽜启动ANDZT,1,0,4,0);  

XXX:(MA120>内下ANDMA60>内下ANDMA20>内下ANDMA10>内下ANDMA5>内下  

ANDMA120<内上ANDMA60<内上ANDMA20<内上ANDMA10<内上ANDMA5<内上)/2;  

⽜启动1:(CROSS(C,内上)ANDXXX)/2;  

STICKLINE(⽜启动1ANDZT,0.5,0,6,0);  

DRAWTEXT(⽜启动,0.8,'★'),COLORRED;  

DRAWTEXT(⽜启动1,0.8,'★'),COLORRED;  

DRAWTEXT(⽜启动1ANDZT,0.8,''),COLORYELLOW;  

DRAWTEXT(⽜启动1ANDZT,0.8,'—暴动'),COLORYELLOW;  

DRAWTEXT(⽜启动ANDZT,0.8,'—暴动'),COLORYELLOW;  

R1:=EMA(HHV(HIGH,500),21);  

R2:=EMA(HHV(HIGH,250),21);  

R3:=EMA(HHV(HIGH,90),21);  

R4:=EMA(LLV(LOW,500),21);  

R5:=EMA(LLV(LOW,250),21);  

R6:=EMA(LLV(LOW,90),21);  

R7:=EMA((R4*0.96+R5*0.96+R6*0.96+R1*0.558+R2*0.558+R3*0.558)/6,2  

1);  

R8:=EMA((R4*1.25+R5*1.23+R6*1.2+R1*0.55+R2*0.55+R3*0.65)/6,21);  

R9:=EMA((R4*1.3+R5*1.3+R6*1.3+R1*0.68+R2*0.68+R3*0.68)/6,21);  

RA:=EMA((R7*3+R8*2+R9)/6*1.738,21);  

RB:=REF(LOW,1);  

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

RD:=EMA(IF(CLOSE*1.35<=RA,RC*10,RC/10),3);  

RE:=LLV(LOW,30);  

RF:=HHV(RD,30);  

R10:=IF(MA(CLOSE,58),1,0);  

主力建仓:EMA(IF(LOW<=RE,(RD+RF*2)/2,0),3)/618*R10,COLORSTICK;  

V1:=MA(V,5);  

V2:=MA(V,10);  

W1:=REF(ABS(V1-V2)/V2,1);  

W9:=W1<0.05ANDREF(C,1)>REF(O,2);  

W2:=REF(C,2)>REF(O,3);  

W3:=C<O;  

W4:=REF(V,2)<REF(V,1);  

搭下阳:W9ANDW2ANDW3ANDW4ANDMA(C,10)>REF(MA(C,10),1)AND  

MA(C,20)>REF(MA(C,20),1);  

W5:=ABS(V1-V2)/V2<0.05ANDV2>V1;  

W6:=W5ANDC<O;  

W7:=REF(W5,1)ANDC<O;  

W8:=REF(V,1)<V;  

上叉阴:W5ANDW6ANDW7ANDW8ANDMA(C,5)<REF(MA(C,5),1)AND  

MA(C,10)<REF(MA(C,10),1)ANDMA(C,20)<REF(MA(C,20),1);  

MA5:=MA(C,5);  

MA10:=MA(C,10);  

MA20:=MA(C,20);  

YHD:=COUNT(REF(MA10<MA20,3),16)>=15ANDCOUNT(MA5>MA10,3)>2;  

小金角:YHDANDCROSS(MA10,MA20)ANDMA20>REF(MA20,1);  

MA62:=MA(C,62);  

V3:=V>REF(V,1);  

大金角:CROSS(MA20,MA62)ANDMA62>REF(MA62,1)ANDCOUNT(V3,3)>2;  

MA4:=MA(C,4);  

L1:=V>REF(V,1);  

V4:=COUNT(CROSS(MA10,MA20),15);  

V5:=C<REF(CLOSE,1)ANDREF(CLOSE,1)<REF(CLOSE,2);  

V6:=V4=1ANDV5ANDMA10>CANDC>MA20ANDSLOPE(MA20,4)>0AND  

SLOPE(MA10,3)>0;  

小金边:REF(V6,2)=1ANDMA4>REF(MA4,1)ANDL1;  

V7:=V>REF(V,1);  

DJJ:=CROSS(MA20,MA62)ANDMA62>REF(MA62,1)ANDCOUNT(V7,3)>2;  

大金边:COUNT(DJJ,30)>0ANDC<MA20ANDC>MA62AND  

MA62>REF(MA62,1);  

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

DEA:=EMA(DIF,9);  

MACD:=2*(DIF-DEA),COLORSTICK,LINETHICK2;  

MACD骑墙:DIF>=0ANDCROSS(DIF,DEA)ANDV/MA(V,5)>1.5;  

MA60:=MA(C,60);  

半山水库:CROSS(MA20,MA60)ANDMA60>REF(MA60,1);  

A1:=BARSLAST(REF(CROSS(DIF,DEA),1)ANDMACD<0);  

隔谷底背:REF(CLOSE,A1+1)>CLOSEANDDIF>REF(DIF,A1+1)AND  

CROSS(DIF,DEA)ANDMACD>0;  

W10:=MA10>REF(MA10,1);  

W11:=MA20>=REF(MA20,1);  

W12:=V>MA(V,5);  

金足底:(MA4<MA20ANDMA4>=REF(MA4,1)ANDC>MA4ANDW10ANDW11  

ANDW12);  

M5:=MA(CLOSE,5);  

M4:=MA(CLOSE,4);  

MA3:=MA(CLOSE,3);  

VOL5:=MA(VOL,5);  

雨青抄底:M5>M4ANDSLOPE(M5,5)<0ANDSLOPE(M4,4)<0AND  

SLOPE(MA3,3)ANDREF(M4>MA3,1)ANDCROSS(MA3,M4)ANDVOL>VOL5;  

VAR1:=SLOPE(MA20,3)>0;  

VAR2:=ABS(SLOPE(MA62,3))<0.19;  

VAR3:=SLOPE(MA62,3)>REF(SLOPE(MA62,3),1);  

V8:=MA62<MA20;  

V9:=COUNT(CROSS(MA20,MA62),10);  

海豚欲张嘴:C>MA62ANDC<REF(CLOSE,1)ANDREF(CLOSE,1)<REF(CLOSE,2)  

ANDVAR1ANDVAR2ANDVAR3ANDV8ANDV9=1;  

A4:=MA(C,4);  

A20:=MA(C,20);  

A62:=MA(C,62);  

海豚张嘴1:CROSS(A20,A62)ANDA20>REF(A20,1)AND  

COUNT(A4/A20>1.05,10)>5ANDABS(A4/A20-1)<0.02ANDV/MA(V,5)>1.5;  

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

AR2:=EMA(AR1,9);  

AR3:=AR1-AR2;  

AR4:=MA(CLOSE,4);  

AR5:=MA(CLOSE,20);  

AR6:=MA(CLOSE,62);  

AR7:=LLVBARS(AR4,4);  

AR8:=LLVBARS(AR6,30);  

AR9:=COUNT(AR7=1,10);  

海豚张嘴2:3<AR8<29ANDAR7=1ANDAR4>AR5ANDAR5>AR6AND  

AR3>-0.022ANDAR9=1ANDSLOPE(AR6,5)<0.035;

image.png

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

AA1赋值:收盘价/1日前的收盘价>1.08

输出XG:统计5日中满足AA1的天数=1 AND AA1

推荐阅读:主力建仓主图指标

  

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),LI  

NETHICK2,COLORRED;  

活筹:=(100*WINNER(REF(CLOSE,1)*1.1)-100*WINNER(REF(CLOSE,1)*0.9));  

主力筹码:=100*WINNER(CLOSE*0.9),COLORCYAN;  

VAR1:=1;  

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

VARA:=3*VAR8-2*SMA(VAR8,15,1);  

散户线:=(100-VARA)*VAR1,COLORRED,LINETHICK2;  

主力线:=MA(WINNER(CLOSE*0.95)*100,3)*VAR1,COLORYELLOW,  

LINETHICK2;  

新庄:=(100-IF(VAR2>5,IF(VAR2<100,VAR2,VAR4-10),0))*VAR1,COLORGREEN,  

LINETHICK1,POINTDOT;  

VARD:=散户线>VAR4;  

{STICKLINE(1,新庄,100,1,0),COLORRED,LINETHICK6;}  

即时虚拟量:=IF(CURRBARSCOUNT=1AND  

PERIOD=5,VOL/FROMOPEN*240,DRAWNULL),NODRAW;  

虚拟量:=IF(CURRBARSCOUNT>1,VOL,即时虚拟量);  

即时量比:虚拟量/REF(MA(虚拟量,5),1),NODRAW,COLORWHITE;  

主力进场:=主力筹码>2ANDREF(主力筹码,1)<1;  

主力建仓:(主力进场AND即时量比>2)*40;  

STICKLINE(主力建仓,20,0,1.5,0),COLORGREEN;  

STICKLINE(主力建仓,55,0,1,0),COLORRED;  

STICKLINE(主力建仓,80,0,0.05,0),COLORWHITE;  

DRAWTEXT(主力进场AND即时量比>2,80,'主'),COLORYELLOW;  

DRAWTEXT(主力进场AND即时量比>2,65,'力'),COLORYELLOW;  

DRAWTEXT(主力进场AND即时量比>2,50,'进'),COLORYELLOW;  

DRAWTEXT(主力进场AND即时量比>2,35,'场'),COLORYELLOW;  

VAR1G:=(((CLOSE/MA(CLOSE,40))*100)<78);  

VAR2G:=(((CLOSE/MA(CLOSE,60))*100)<74);  

VAR3G:=(HIGH>(LOW*1.051));  

VAR4G:=(VAR3GAND(COUNT(VAR3G,5)>1));  

AA:=IF((VAR4GAND(VAR1GORVAR2G)),2,0);  

BB:=C/REF(C,25)<=1.1;  

CC:=(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15;  

V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;  

操盘线:=SMA(V3,2,1);  

V5:=SMA(操盘线,2,1);  

抄底:=IF(操盘线>REF(操盘线,1)ANDREF(操盘线,1)<REF(操盘线,2)AND操  

盘线<23,1.5,0);  

买就赢利:=BBANDAAANDCCAND抄底;  

参考:=MA(CLOSE,5);  

做多:=MA(CLOSE,10);  

准线:=EMA(CLOSE,14);  

涨幅%:=(C-REF(C,1))/REF(C,1)*100;  

条件6:=参考<做多AND做多<准线;  

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

DEAF:=EMA(DIFF,9);  

低位金叉:=CROSS(DIFF,DEAF)ANDDIFF<-0.1;  

A1:=BARSLAST(REF(CROSS(DIFF,DEAF),1));  

背离:=REF(CLOSE,A1+1)>CLOSEANDDIFF>REF(DIFF,A1+1)AND  

CROSS(DIFF,DEAF);  

潜伏:=低位金叉AND底背离;  

DIF1:=EMA(C,13)-EMA(C,21);  

DEA:=EMA(DIF1,5);  

庄家埋伏:=REF(DIF1<0ANDDIF1<DEA,1)ANDDIF1<0ANDDIF1>DEAAND  

潜伏AND条件6;  

好运当头:买就赢利OR庄家埋伏;  

STICKLINE(好运当头,20,0,1.5,0),COLORGREEN;  

STICKLINE(好运当头,55,0,1,0),COLORRED;  

STICKLINE(好运当头,80,0,0.05,0),COLORWHITE;  

DRAWTEXT(好运当头,80,'好'),COLORYELLOW;  

DRAWTEXT(好运当头,65,'运'),COLORYELLOW;  

DRAWTEXT(好运当头,50,'当'),COLORYELLOW;  

DRAWTEXT(好运当头,35,'头'),COLORYELLOW;

image.png

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