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

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

授权方式: 免费版

指标评级: ★★★★★

指标分类: 策略

画线方法: 副图

一、通达信四量图指标公式源码

  

时间:DATE+1900/00/00,NODRAW,COLORWHITE;  

MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210,COLORGREEN{COLORRED};  

马线:=MA(牛线,3),COLORMAGENTA{COLORYELLOW};  

GB:=(C-牛线);  

换手:=V*100/CAPITAL;  

主:=MA(换手,5);  

大:=MA(换手,12);  

中:=MA(换手,34);  

散:=MA(换手,55);  

均:=(主+大+中+散)/4;  

GBB:=(主-散);  

GB1:=GB+GBB;  

STICKLINE(GB1>=0,2.5,4,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(GB1<0,2.5,4,4,0),COLORGREEN{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,3.2,0),'散户'),COLORWHITE;  

AA:=MAX(MA(C,60),MA(C,120));  

BB:=MIN(MA(C,60),MA(C,120));  

成交量:=V,COLORWHITE,LINETHICK0;  

Q:=EMA(V,5);  

Q1:=EMA(V,50);  

OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);  

OBV1:=EMA(OBV,5);  

OBV2:=EMA(OBV,50);  

W:=(Q-Q1)*0.00001;  

W1:=(OBV1-OBV2)*0.000001;  

W2:=W+W1;  

STICKLINE(W2>=0,0.3,1.8,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(W2<0,0.3,1.8,4,0),COLORGREEN{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,1,0),'游资'),COLORWHITE;  

{R:=0;}  

E:=MAX(MA(C,45),MA(C,90));  

FF:=MIN(MA(C,45),MA(C,90));  

C1:=10000*CLOSE/INDEXC;  

O1:=10000*OPEN/INDEXO;  

H1:=10000*HIGH/INDEXH;  

L1:=10000*LOW/INDEXL;  

LL:=IF(L1<C1ANDL1<O1,L1,MIN(C1,O1));  

HH:=IF(H1>C1ANDH1>O1,H1,MAX(C1,O1));  

A:=EMA(C1,5);  

B:=EMA(C1,12);  

D:=EMA(C1,30);  

XX:=EMA(C1,35);  

F:=EMA(C1,7);  

均量:=(A+B+D)/3;  

VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);  

OBV11:=SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);  

MAOBV:=MA(OBV11,30);  

MTR:=EMA(EMA(EMA(CLOSE,12),12),12);  

TRIX:=(MTR-REF(MTR,1))/REF(MTR,1)*100;  

MATRIX:=MA(TRIX,9);  

MIDA:=CLOSE-MIN(REF(CLOSE,1),LOW);  

MIDB:=IF(CLOSE<REF(CLOSE,1),CLOSE-MAX(REF(CLOSE,1),HIGH),0);  

WAD:=SUM(IF(CLOSE>REF(CLOSE,1),MIDA,MIDB),0);  

MAWAD:=MA(WAD,30);  

JB:=(OBV11-MAOBV)*0.000001+(A-XX);  

机构:=A-XX;  

STICKLINE(机构>=0,-1.9,-0.4,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(机构<0,-1.9,-0.4,4,0),COLORGREEN{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-1.2,0),'机构'),COLORWHITE;  

J:=MAX(MA(C,30),MA(C,60));  

K:=MIN(MA(C,30),MA(C,60));  

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+  

16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+  

13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+  

10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+  

7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+  

4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;  

MADKX:=MA(DKX,6);  

MDD:=(DKX-MADKX)*1.2;  

V1:=(C*2+H+L)/4*10;  

V2:=EMA(V1,6)-EMA(V1,55);  

V3:=EMA(V2,6);  

V4:=2*(V2-V3)*5.5;  

V5:=(V2-V3)*0.06;  

V6:=MDD+V5;  

STICKLINE(V6>=0,-4.1,-2.6,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(V6<0,-4.1,-2.6,4,0),COLORGREEN{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-3.4,0),'主力'),COLORWHITE;  

BQIUV:(GB1),COLORWHITE,NODRAW;  

BQIUSV:(W2),COLORYELLOW,NODRAW;  

WWV:(A-XX),COLORBLUE,NODRAW;  

XEV:(V6),COLORGREEN,NODRAW;  

MID9:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线1:=(20*MID9+19*REF(MID9,1)+18*REF(MID9,2)+17*REF(MID9,3)+16*REF(MID9,4)+15*REF(MID9,5)+14*REF(MID9,6)+13*REF(MID9,7)+12*REF(MID9,8)+11*REF(MID9,9)+10*REF(MID9,10)+9*REF(MID9,11)+8*REF(MID9,12)+7*REF(MID9,13)+6*REF(MID9,14)+5*REF(MID9,15)+4*REF(MID9,16)+3*REF(MID9,17)+2*REF(MID9,18)+REF(MID9,20))/210,COLORGREEN{COLORRED};  

马线1:=MA(牛线1,6),COLORMAGENTA{COLORYELLOW};  

STICKLINE(C>牛线1,-1.9,-0.4,4,0),COLOR000099{COLOR017700},LINETHICK2;  

STICKLINE(C<马线1,-1.9,-0.4,4,0),COLOR017700{COLOR000099},LINETHICK2;  

STICKLINE(牛线1>=CANDC>=马线1,-1.9,-0.4,8,0),,COLOR017700{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-1,-0.4),'机构'),COLORWHITE;  

时间:DATE+1900/00/00,NODRAW,COLORWHITE;  

MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210,COLORGREEN{COLORRED};  

马线:=MA(牛线,3),COLORMAGENTA{COLORYELLOW};  

GB:=(C-牛线);  

换手:=V*100/CAPITAL;  

主:=MA(换手,5);  

大:=MA(换手,12);  

中:=MA(换手,34);  

散:=MA(换手,55);  

均:=(主+大+中+散)/4;  

GBB:=(主-散);  

GB1:=GB+GBB;  

STICKLINE(GB1>=0,2.5,4,4,0),COLOR000099{COLOR017700},LINETHICK2;  

STICKLINE(GB1<0,2.5,4,4,0),COLOR017700{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,3.2,0),'散户'),COLORWHITE;  

AA:=MAX(MA(C,60),MA(C,120));  

BB:=MIN(MA(C,60),MA(C,120));  

成交量:=V,COLORWHITE,LINETHICK0;  

Q:=EMA(V,5);  

Q1:=EMA(V,50);  

OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);  

OBV1:=EMA(OBV,5);  

OBV2:=EMA(OBV,50);  

W:=(Q-Q1)*0.00001;  

W1:=(OBV1-OBV2)*0.000001;  

W2:=W+W1;  

STICKLINE(W2>=0,0.3,1.8,4,0),COLOR000099{COLOR017700},LINETHICK2;  

STICKLINE(W2<0,0.3,1.8,4,0),COLOR017700{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,1,0),'游资'),COLORWHITE;  

J:=MAX(MA(C,30),MA(C,60));  

K:=MIN(MA(C,30),MA(C,60));  

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+  

16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+  

13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+  

10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+  

7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+  

4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;  

MADKX:=MA(DKX,6);  

MDD:=(DKX-MADKX)*1.2;  

V1:=(C*2+H+L)/4*10;  

V2:=EMA(V1,6)-EMA(V1,55);  

V3:=EMA(V2,6);  

V4:=2*(V2-V3)*5.5;  

V5:=(V2-V3)*0.06;  

V6:=MDD+V5;  

STICKLINE(V6>=0,-4.1,-2.6,4,0),COLOR000099{COLOR017700},LINETHICK2;  

STICKLINE(V6<0,-4.1,-2.6,4,0),COLOR017700{COLOR000099},LINETHICK2;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-3.4,0),'主力'),COLORWHITE;  

BQIUV:(GB1),COLORWHITE,NODRAW;  

BQIUSV:(W2),COLORYELLOW,NODRAW;  

WWW:(C-牛线1),COLORYELLOW,NODRAW;  

XEV:(V6),COLORGREEN,NODRAW;  

{  

选股公式:  

MID9:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线1:=(20*MID9+19*REF(MID9,1)+18*REF(MID9,2)+17*REF(MID9,3)+16*REF(MID9,4)+15*REF(MID9,5)+14*REF(MID9,6)+13*REF(MID9,7)+12*REF(MID9,8)+11*REF(MID9,9)+10*REF(MID9,10)+9*REF(MID9,11)+8*REF(MID9,12)+7*REF(MID9,13)+6*REF(MID9,14)+5*REF(MID9,15)+4*REF(MID9,16)+3*REF(MID9,17)+2*REF(MID9,18)+REF(MID9,20))/210,COLORGREEN;  

MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210,COLORGREEN;  

GB:=(C-牛线);  

换手:=V*100/CAPITAL;  

主:=MA(换手,5);  

散:=MA(换手,55);  

GBB:=(主-散);  

GB1:=GB+GBB;  

Q:=EMA(V,5);  

Q1:=EMA(V,50);  

OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);  

OBV1:=EMA(OBV,5);  

OBV2:=EMA(OBV,50);  

W:=(Q-Q1)*0.00001;  

W1:=(OBV1-OBV2)*0.000001;  

W2:=W+W1;  

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;  

MADKX:=MA(DKX,6);  

MDD:=(DKX-MADKX)*1.2;  

V1:=(C*2+H+L)/4*10;  

V2:=EMA(V1,6)-EMA(V1,55);  

V3:=EMA(V2,6);  

V5:=(V2-V3)*0.06;  

V6:=MDD+V5;  

机构:=C>牛线1;  

散户:=GB1>=0;  

游资:=W2>=0;  

主力:=V6>=0;  

XG:=机构AND散户AND游资AND主力;  

共振:XGANDREF(NOT(XG),1);  

}

image.png

二、2022四量图指标公式源码

  

SMA1:=24;  

SMA2:=14;  

SMA3:=6;  

SMA4:=6;  

MID9:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线1:=(20*MID9+19*REF(MID9,1)+18*REF(MID9,2)+17*REF(MID9,3)+16*REF(MID9,4)+15*REF(MID9,5)+14*REF(MID9,6)+13*REF(MID9,7)+12*REF(MID9,8)+11*REF(MID9,9)+10*REF(MID9,10)+9*REF(MID9,11)+8*REF(MID9,12)+7*REF(MID9,13)+6*REF(MID9,14)+5*REF(MID9,15)+4*REF(MID9,16)+3*REF(MID9,17)+2*REF(MID9,18)+REF(MID9,20))/210,COLORGREEN{COLORRED};  

马线1:=MA(牛线1,6),COLORMAGENTA{COLORYELLOW};  

STICKLINE(C>牛线1,-1.9,-0.4,4,0),COLORRED{COLORED},LINETHICK2;  

STICKLINE(C<马线1,-1.9,-0.4,4,0),COLOR008000{COLORGREEN},LINETHICK2;  

STICKLINE(牛线1>=CANDC>=马线1,-1.9,-0.4,8,0),COLOR008000{COLORGREEN},LINETHICK2;  

MID1:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

牛线:=(20*MID1+19*REF(MID1,1)+18*REF(MID1,2)+17*REF(MID1,3)+16*REF(MID1,4)+15*REF(MID1,5)+14*REF(MID1,6)+13*REF(MID1,7)+12*REF(MID1,8)+11*REF(MID1,9)+10*REF(MID1,10)+9*REF(MID1,11)+8*REF(MID1,12)+7*REF(MID1,13)+6*REF(MID1,14)+5*REF(MID1,15)+4*REF(MID1,16)+3*REF(MID1,17)+2*REF(MID1,18)+REF(MID1,20))/210,COLORGREEN{COLORRED};  

马线:=MA(牛线,3),COLORMAGENTA{COLORYELLOW};  

GB:=(C-牛线);  

换手:=V*100/CAPITAL;  

主:=MA(换手,5);  

大:=MA(换手,12);  

中:=MA(换手,34);  

散:=MA(换手,55);  

均:=(主+大+中+散)/4;  

GBB:=(主-散);  

GB1:=GB+GBB;  

STICKLINE(GB1>=0,2.5,4,4,0),COLORRED{COLORRED},LINETHICK2;  

STICKLINE(GB1<0,2.5,4,4,0),COLOR008000{COLORGREEN},LINETHICK2;  

AA:=MAX(MA(C,60),MA(C,120));  

BB:=MIN(MA(C,60),MA(C,120));  

成交量:=V,COLORWHITE,LINETHICK0;  

Q:=EMA(V,5);  

Q1:=EMA(V,50);  

OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);  

OBV1:=EMA(OBV,5);  

OBV2:=EMA(OBV,50);  

W:=(Q-Q1)*0.00001;  

W1:=(OBV1-OBV2)*0.000001;  

W2:=W+W1;  

STICKLINE(W2>=0,0.3,1.8,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(W2<0,0.3,1.8,4,0),COLOR008000{COLORGREEN},LINETHICK2;  

J:=MAX(MA(C,30),MA(C,60));  

K:=MIN(MA(C,30),MA(C,60));  

MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;  

DKX:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+  

16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+  

13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+  

10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+  

7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+  

4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;  

MADKX:=MA(DKX,6);  

MDD:=(DKX-MADKX)*1.2;  

V1:=(C*2+H+L)/4*10;  

V2:=EMA(V1,6)-EMA(V1,55);  

V3:=EMA(V2,6);  

V4:=2*(V2-V3)*5.5;  

V5:=(V2-V3)*0.06;  

V6:=MDD+V5;  

STICKLINE(V6>=0,-4.1,-2.6,4,0),COLORRED{COLOR017700},LINETHICK2;  

STICKLINE(V6<0,-4.1,-2.6,4,0),COLOR008000{COLORGREEN},LINETHICK2;  

散户:(GB1),COLORWHITE,NODRAW;  

游资:(W2),COLORWHITE,NODRAW;  

机构:(C-牛线1),COLORYELLOW,NODRAW;  

主力:(V6),COLORRED,NODRAW;  

主力共量:机构+主力,COLORCYAN,NODRAW;  

N:=15;  

SAT1:=IF((AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*4>4,4,(AMOUNT/C)/(HHV(AMOUNT,N)/HHV(C,N))*4);  

STICKLINE(((SAT1>=4)ANDBARSCOUNT(C)),0,(0+SAT1),1.2,0),COLORYELLOW;  

能量饱和度:SAT1,LINETHICK1,COLORYELLOW,LINETHICK1;  

{数字显示}  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,3.2,0),VAR2STR(散户,2)),COLORWHITE;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,1,0),VAR2STR(游资,2)),COLORWHITE;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-1,-0.4),VAR2STR(机构,2)),COLORWHITE;  

DRAWTEXT(ISLASTBAR=1,IF(V>=0,-3.4,0),VAR2STR(主力,2)),COLORWHITE;  

DRAWGBK(1,RGB(1,1,1),RGB(1,1,1),0,'00',0);  

DRAWBAND(20,RGB(60,20,45),0,RGB(0,0,0));  

主力筹码估算:=EMA(WINNER(CLOSE)*70,3),NODRAW;  

散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3),NODRAW;  

主力控盘比率0:=主力筹码估算/(主力筹码估算+散户筹码估算)*100;  

主力控盘比率:=IF(主力控盘比率0<-6,-6,IF(主力控盘比率0>100,100+SQRT(主力控盘比率0-100),主力控盘比率0));  

市场总量:=MA(主力筹码估算+散户筹码估算,13),NODRAW;  

散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW;  

散户警戒:=EMA(散户套牢比率,89);  

主力警戒:EMA(主力控盘比率,89),COLORBLACK,LINETHICK4;  

{主力控盘筹码}  

{粉}  

STICKLINE(主力控盘比率>REF(主力控盘比率,1)AND主力控盘比率>20,主力控盘比率,20,2,0),COLOR880099;  

{蓝}  

STICKLINE(主力控盘比率<=REF(主力控盘比率,1)AND主力控盘比率>20,主力控盘比率,20,2,0),COLORCC7700;  

{亮红}  

STICKLINE(主力控盘比率>REF(主力控盘比率,1)AND主力控盘比率<20,主力控盘比率,0,2,0),COLOR131FFD;  

{深蓝}  

STICKLINE(主力控盘比率<=REF(主力控盘比率,1)AND主力控盘比率<20,主力控盘比率,0,2,0),COLOR990000;  

STICKLINE(主力控盘比率>20,20,主力控盘比率,0,0),COLORAAAAAA;  

{主力筹码警戒}  

{黄}  

STICKLINE(主力警戒>REF(主力警戒,1),主力控盘比率,主力警戒,2,0),COLOR0055DD;  

STICKLINE(主力警戒>REF(主力警戒,1),主力控盘比率,主力警戒,0.3,0),COLOR00AADD;  

{红}  

STICKLINE(主力控盘比率>主力警戒AND主力警戒>50,主力控盘比率,主力警戒,2,0),COLOR0000AA;  

STICKLINE(主力控盘比率>主力警戒AND主力警戒>50,主力控盘比率,主力警戒,0.3,0),COLOR0055FF;  

{红}  

STICKLINE(主力控盘比率>主力警戒AND主力警戒<50AND主力控盘比率>50AND主力警戒>REF(主力警戒,1),主力控盘比率,50,2,0),COLOR0000AA;  

STICKLINE(主力控盘比率>主力警戒AND主力警戒<50AND主力控盘比率>50AND主力警戒>REF(主力警戒,1),主力控盘比率,50,0.3,0),COLOR0055FF;  

STICKLINE(主力控盘比率<=10,主力控盘比率,0,4,0),COLORDD00DD;  

STICKLINE(REF(散户套牢比率,1)>90AND散户套牢比率<90,30,0,2.5,0),COLOR0000FF;  

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

VAR33:=100-3*SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,72))/(HHV(HIGH,72)-LLV(LOW,72))*100,20,1),15,1);  

活筹OAMV:=EMA(VAR33,2);  

做空资金:=EMA(EMA(SMA(VAR11,6,1)-7,2),2);  

WR线:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),3),3);  

SBZLPA1:=BARSLAST(L=HHV(L,7));  

SBZLPA2:=EMA(SBZLPA1*SBZLPA1,13);  

我心飞扬:=IF(SBZLPA2>88,88+SQRT(SBZLPA2-88),SBZLPA2);  

TPV:=(我心飞扬+做空资金+活筹OAMV)/3;  

T我心飞扬:=(我心飞扬+TPV)/2+8;  

T做空资金:=(做空资金+TPV)/2+8;  

T飞扬资金:=(T我心飞扬+T做空资金)/2;  

WR慢:=EMA(EMA(100*(HHV(HIGH,42)-CLOSE)/(HHV(HIGH,42)-LLV(LOW,42)),2),2);  

ZLCQ:=EMA((WINNER(CLOSE)*69),3);  

SHCQ:=EMA(((WINNER((CLOSE*1.1))-WINNER((CLOSE*0.93)))*80),3);  

主力控盘Q:=EMA(((ZLCQ/(ZLCQ+SHCQ))*110),2);  

上限Q:=HHV(主力控盘Q,20);  

下限Q:=LLV(主力控盘Q,20);  

圈Q:=100*(HHV(HIGH,42)-C)/(HHV(HIGH,42)-LLV(LOW,42));  

M圈Q:=EMA(EMA(圈Q,3),2);  

MM圈Q:=EMA(EMA(EMA(圈Q,4),3),2);  

控盘主升Q:=EMA(主力控盘Q,2);  

KONGQ0:=(上限Q/控盘主升Q)*(下限Q/控盘主升Q)*50;  

KONGQ:=IF(KONGQ0>100,100,IF(KONGQ0<1,1,KONGQ0));  

MAXV:=MAX(T做空资金,T我心飞扬);  

MINV:=MIN(T做空资金,T我心飞扬);  

MMV0:=MAXV/MINV;  

MMV1:=T做空资金/REF(T做空资金,1);  

MMV2:=T我心飞扬/REF(T我心飞扬,1);  

散筹集中度Q:=EMA(EMA((WINNER(C*1.1)-WINNER(C*0.9))*50/(WR慢/MM圈Q)/MMV0/MMV1/MMV2,3),2);  

KKONG0:=KONGQ*KONGQ*5/SQRT(散筹集中度Q)/控盘主升Q;  

KKONG:=IF(KKONG0>100,100,KKONG0);  

KV0:=KKONG/KONGQ;  

KV1:=KONGQ/REF(KONGQ,1);  

KV2:=KKONG/REF(KKONG,1);  

KV3:=EMA(KV0*KV0*KV1*KV2*30,2);  

OKV:=IF(KV3>100,100,IF(KV3<0,0,KV3));  

WVQ0:=1.18*(上限Q*下限Q+5)/(KONGQ+2)/SQRT(SQRT((OKV+2)/(KONGQ+5)));  

WVQ1:=100-IF(WVQ0>90,90+SQRT(WVQ0-90),IF(WVQ0<1,1,WVQ0));  

WVVQ:=EMA(EMA(IF(WVQ1<0.5,0.5,WVQ1),2),2);  

EVVQ:=EMA(EMA(WVVQ*0.96,3),3);  

DRAWBAND(WVVQ,RGB(11,88,55),EVVQ,RGB(128,0,255));  

MTR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);  

HD:=HIGH-REF(HIGH,1);  

LD:=REF(LOW,1)-LOW;  

DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);  

DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);  

PDI:=DMP*100/MTR;  

MDI:=DMM*100/MTR;  

ADX0:=EMA(100-EMA(ABS(MDI-PDI)/(MDI+PDI)*主力控盘Q+下限Q,6),3);  

ADX:=IF(ADX0<0.5,0.5,IF(ADX0>106,106,ADX0));  

ADXR:=EXPMEMA(ADX,6),COLORGRAY,LINETHICK3;  

DRAWBAND(ADXR,RGB(255,99,191),ADX,RGB(80,152,145));  

RSV1:=(CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100;  

FASTK:=SMA(RSV1,3,1);  

龙K:=SMA(FASTK,2,1);  

龙D:=SMA(龙K,5,1);  

UK0:=EVVQ*39/龙D;  

UK:=IF(UK0>98,98,IF(UK0<1,1,UK0));  

价量:=EMA(0.98*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),2);  

主线:=EMA(0.98*(((价量-LLV(价量,27))/(HHV(价量,27)-LLV(价量,27)))*(4))*(25),2);  

主价:=SQRT(价量*主线*1.1);  

OKK0:(价量+主价)/2,NODRAW;  

OKK1:=UK*10/(OKK0+1)+40;  

OKK2:=IF(OKK1>96,96+SQRT(SQRT(OKK1-96)),IF(OKK1<1,1,OKK1));  

OKK3:=(100-OKK2);  

OKK4:=IF(OKK3>0,IF(OKK3>100,100,OKK3),0-SQRT(0-OKK3));  

OKK5:=(OKK2-UK)-UK+100,NODRAW;  

NOK:=106-IF(OKK5>96,96+SQRT(OKK5-96),IF(OKK5<1,1,OKK5)),COLORBLUE,LINETHICK2;  

OKK7:=((OKK2+10)/(OKK0+10))*((NOK+10)/(OKK0+10))*((OKK4+10)/(OKK0+10))*2;  

OKK8:=IF(OKK7>100,100+SQRT(OKK7-100),OKK7);  

OKK99:=98-SQRT(OKK8*NOK);  

OKK9:=IF(OKK99<1,1-SQRT(ABS(OKK99)),OKK99);  

OOK0:=(ABS(OKK0-OKK9)*1.18+18);  

OOK1:=IF(OOK0<1,1,IF(OOK0>100,100,OOK0));  

OOK2:=((ABS(OKK0-OKK9)*1.14+14));{106-}  

OOK3:=IF(OOK2<1,1,IF(OOK2>100,100,OOK2)),COLORWHITE,LINETHICK2;{106-}  

OPK0:=EMA(SQRT(OKK2*NOK/OOK3)*12.6*ABS((OOK1+10)/(OKK9+10)),2);  

OPK1:=0.76*OPK0*((REF(OKK0,1)+10)/(OKK0+10))*((REF(OKK0,1)+10)/(OKK0+10))*((REF(OKK9,1)+10)/(OKK9+10))*((REF(OKK9,1)+10)/(OKK9+10));  

OPK:=IF(OPK1>96,96+SQRT(SQRT((OPK1-96)/2)),IF(OPK1<1,1,OPK1));  

OQK0:=(OPK-OOK1)+50;  

OQK:=IF(OQK0>98,98+SQRT(OQK0-98),IF(OQK0<1,1,OQK0));  

VK0:=((OPK/(OQK+1))*(OOK3/(OKK0/主力警戒+1)+31));  

VK:=IF(VK0>98,98+SQRT(VK0-98),IF(VK0<1,1,VK0));{96-}  

VKK2:=EMA(SQRT((106-UK)*OOK0)/(SQRT(OQK*OPK)/NOK+0.16)/SQRT(ADXR/ADX),2)*0.88;  

WLL:IF(VKK2<1,1,IF(VKK2>95,96,VKK2)),COLORWHITE,LINETHICK2;  

OKK0,COLORRED,LINETHICK2;

image.png

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

MA1赋值:收盘价的20日简单移动平均

MA2赋值:收盘价的40日简单移动平均

MA3赋值:收盘价的60日简单移动平均

A1赋值:开盘价<MA1 OR 开盘价<MA2 OR 开盘价<MA3

A2赋值:收盘价>MA1和MA2和MA3的较大值的较大值

A3赋值:成交量(手)/成交量(手)的30日简单移动平均>1.2

A4赋值:收盘价/1日前的收盘价>1.049

输出TJ:A1 AND A2 AND A3 AND A4

推荐阅读:通达信四量图选股公式

  

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

AA2:=EMA(EMA(EMA(CLOSE,7),7),7);  

AA3:=EMA(EMA(EMA(CLOSE,12),12),12);  

BB1:=(AA1-REF(AA1,1))/REF(AA1,1)*200000,;  

BB2:=(AA2-REF(AA2,1))/REF(AA2,1)*250000,;  

N1:=30;N2:=10;  

VAR1:=EMA(EMA(CLOSE,13),13);  

VAR2:=EMA(EMA(CLOSE,10),10);  

K:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000,COLORRED;  

买:=EMA(C,2);  

进:=EMA(SLOPE(C,9)*20+C,37);  

BOLL:=MA(C,20);  

UB:=BOLL+2*STD(C,20);  

LB:=BOLL-2*STD(C,20);  

TT1:=C>LB;  

TT2:=COUNT(C/REF(C,1)>=1.098ANDL<C,25)>=1AND  

BARSCOUNT(C)>120;  

XG:(K>=REF(K,1))ANDK<-8ANDCROSS(BB1,BB2)AND  

CROSS(买,进)ANDTT1ANDTT2;  

ZT1:=C/REF(C,1)>1.095ANDC==H;  

ZT2:=C/REF(C,1)>1.185ANDC==H;  

ZT:=ZT1ORZT2;  

涨停:=COUNT(ZT,40)>0;{单步调试样本30%}{分步调试时非常成功}  

低点30:=LLV(C,30);  

低点60:=LLV(C,60);{单步调试样本20%}  

高点40:=REF(HHV(C,40),10);  

低点40:=REF(LLV(C,40),10);  

突破点TJ1:=EXIST(C>高点40,3)ANDCOUNT(C>高点40,7)<=2ANDC/高点40<1.06;  

突破点TJ2:=LLV(C,7)<高点40;  

突破点:=突破点TJ1AND突破点TJ2;  

一浪不太浪:=高点40/低点40<1.5;{三浪不是最短浪,1+3浪就翻倍了}  

金叉:=MACD.DIF>MACD.DEA;  

不亏损:=FINANCE(38)>0;  

XG:有涨停AND低点60<低点30AND不亏损AND  

突破点AND金叉AND一浪不太浪;  

量:VOL,NODRAW,COLORWHITE;  

STICKLINE(量<=HHV(量,144)*0.2,0,量,10,0),COLORGRAY;  

STICKLINE(量>=HHV(量,144),0,量,10,0),COLORGREEN;  

STICKLINE(量>HHV(量,144)*0.2AND量<HHV(量,144)ANDC>REF(C,1)AND(量/REF(量,1)<1.5OR量/REF(量,1)>3.6),0,量,10,1),COLORRED;  

STICKLINE(量>HHV(量,144)*0.2AND量<HHV(量,144)ANDC<=REF(C,1)AND(量/REF(量,1)<1.5OR量/REF(量,1)>3.6),0,量,10,1),COLORCYAN;  

STICKLINE(量<=HHV(量,144)*0.2AND量/REF(量,1)>=1.5AND量/REF(量,1)<=3.6,REF(量,1),量,10,0),COLORYELLOW;  

STICKLINE(量>HHV(量,144)*0.2AND量<HHV(量,144)AND量/REF(量,1)>=1.5AND量/REF(量,1)<=3.6,0,量,10,0),COLORYELLOW;  

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

主买:IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),NODRAW,COLORRED;  

主卖:IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),NODRAW,COLORGREEN;  

净流:主买+主卖,NODRAW,COLORCYAN;  

STICKLINE(C>REF(C,1),0,主买,8,0),COLORRED;  

STICKLINE(C<=REF(C,1),0,主买,8,0),COLORGREEN;  

量比:VOL/REF(VOL,1),NODRAW,COLORCYAN;  

主买占比:主买/量*100,NODRAW,COLOR336699;  

E5:EMA(量,5),COLORCYAN;  

E21:EMA(量,21),COLORGREEN;  

E144:EMA(量,144),COLORMAGENTA;

image.png

每日公式解答:

公式编写要求:

等量图(EQUVOL)”为什么显示不全,还有这个指标的源码是什么,如何能改成大智慧,谢谢老师

公式编写方法:

 不是等量图显示不全,而是“等量图与K线在时间单位上不对齐”,有宽有窄,互不重叠,总体上看有压缩。

楼主找几个上市一个月以内的新股观察就一目了然了。

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