通达信四量图指标公式
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)+1
5*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{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;
MA10:=MA(CLOSE,50);
HJ_8:=(REF(CLOSE,3)-CLOSE)/REF(CLOSE,3)*100>5;
HJ_9:=FILTER(HJ_8,10);
HJ_10:=BARSLAST(HJ_9);
HJ_11:=REF(HIGH,HJ_10+2);
HJ_12:=REF(HIGH,HJ_10+1);
HJ_13:=REF(HIGH,HJ_10);
HJ_14:=MAX(HJ_11,HJ_12);
HJ_15:=MAX(HJ_14,HJ_13);
HJ_16:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5;
HJ_17:=HJ_10<150;
HJ_18:=(OPEN-HJ_15)/HJ_15*100<30;
HJ_19:=(CLOSE-LLV(LOW,HJ_10))/LLV(LOW,HJ_10)*100<50;
HJ_20:=(CLOSE-REF(OPEN,5))/REF(OPEN,5)*100<30;
HJ_21:=VOL/MA(VOL,5)<3.5;
HJ_22:=(CLOSE-REF(CLOSE,89))/REF(CLOSE,89)*100<80;
HJ_25:=HJ_16ANDHJ_17ANDHJ_18ANDHJ_19ANDHJ_20ANDHJ_21ANDHJ_22;
DRAWTEXT_FIX(1,0,0,0,'诚信走天下(13253561583)早盘竞价抓板群'),COLORYELLOW;
BL:=FILTER(HJ_25,15);
MA54:=MA(CLOSE,54);
PL1:=(((CLOSE-MA54)/MA54)<0.1);
PL2:=(((CLOSE-MA10)/MA10)<0.3);
PLL:=(((PL1=1)AND(PL2=1))*0.2);
PTTP:=((((PLL=0)AND(REF(PLL,1)=0.2))AND(REF((COUNT((PLL=0.2),10)=10),1)=1))*-0.1);
YGTP:=PTTP=-0.1;
XDF:=(BLORYGTP);
VARA:=DMA(AMOUNT/VOL/100,VOL/CAPITAL);
VARAA:=DYNAINFO(7)/(REF(CLOSE,1))>1.05AND(DYNAINFO(7)/O>1.05);
FLIGA:=(VOL/REF(VOL,1)>1.2ANDCOUNT(CLOSE>OPEN,1))OR(LOW>REF(HIGH,1)ANDCOUNT(OPEN>CLOSE,1)ANDVOL/REF(VOL,1)>1.2);
YG:=(XDFANDC/REF(C,1)>1.095ANDFLIGAANDVARAA);
M5:=MA(C,5);
M8:=MA(C,8);
M13:=MA(C,13);
M21:=MA(C,21);
M34:=MA(C,34);
M55:=MA(C,55);
VAR1P:=O<=M5ANDC>M5;
VAR2P:=O<=M8ANDC>M8;
VAR3P:=O<=M13ANDC>M13;
VAR4P:=O<=M21ANDC>M21;
VAR5P:=O<=M34ANDC>M34;
VAR6P:=O<=M55ANDC>M55;
CD:=(VAR1P+VAR2P+VAR3P+VAR4P+VAR5P+VAR6P)>4;
X1A_1:=IF(CLOSE>REF(CLOSE,1),88,0);
X1A_2:=IF(CLOSE/REF(CLOSE,1)>1.03ANDHIGH/CLOSE<1.01ANDX1A_1>0,91,0);
LT:=FILTER(X1A_2>90,45)=1;
底部妖龙:CDANDYGAND(REF(LT,1)ORREF(LT,2)ORLT);
STICKLINE(底部妖龙,5,0,1,0),COLORRED;
主力筹码估算:=EMA(WINNER(CLOSE)*70,3),NODRAW,LINETHICK0;
散户筹码估算:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3),NODRAW;
散户套牢比率:=散户筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW;
主力控盘比率:=主力筹码估算/(主力筹码估算+散户筹码估算)*100,NODRAW,LINETHICK0;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.88,0,'■主力筹码估算:'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.22,0.88,0,'%'),COLORFFCC99;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.17,0.88,0,主力筹码估算),COLORRED;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.35,0.88,0,'■主力控盘比率:'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.50,0.88,0,'%'),COLORFFCC99;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.45,0.88,0,主力控盘比率),COLORRED;
VAR1:=REF(LOW,1);
VAR2:=(SMA(ABS(LOW-VAR1),13,1))/(SMA(MAX(LOW-VAR1,0),13,1))*4;
VAR3:=EMA(VAR2,13);
VAR4:=LLV(LOW,34);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
VAR6:=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);
VAR7:=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);
VAR8:=VAR6<REF(VAR7,1)ANDVOL>REF(VOL,1)ANDCLOSE>REF(CLOSE,1);
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,4.1,5,0),COLORAA00BB;{粉色住}
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,4.1,5,0),COLORBB11BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,4.1,5,0),COLORCC22BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,4.1,3,0),COLORDD33BB;
STICKLINE(VAR8ANDCOUNT(VAR8,18)=1,0,4.1,1,0),COLOREE44BB;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,3.2,'●↙大资金进场'),COLOR0099FF;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,1.6,'●↙择机买入'),COLOR0033FF;
DRAWTEXT(VAR8ANDCOUNT(VAR8,18)=1,0.8,'●↙多数会涨'),COLORFFFFAA;
{MACD回拉买点}
DIF:EMA(CLOSE,12)-EMA(CLOSE,26)COLORRED;
DEA:EMA(DIF,9)COLORGREEN;
MACD:(DIF-DEA)*2,COLORSTICK;
买线1:=LLV(MA(((C+L+O+H)/4),10),5);
卖线:=HHV(MA(((C+L+O+H)/4),5),5);
倍:=(卖线+买线1)/2;
涨停价:=ZTPRICE(REF(C,1),0.1)NODRAW;
跌停价:=DTPRICE(REF(C,1),0.1)NODRAW;
注:=CROSS(C,倍)NODRAW;
试:=H>=倍ANDC<倍AND(C>=OORC>=REF(CLOSE,1))NODRAW;
价:(卖线+买线1)/2NODRAW;
涨停:=CLOSE/REF(CLOSE,1)>=1.095;
STICKLINE(注=1,0,MACD,0.2,0),COLORYELLOW;
STICKLINE(H>=倍ANDC<倍,0,MACD,0.2,0),COLORWHITE;
DRAWTEXT(注=1AND涨停,2.2,'妖'),COLORYELLOW,LINETHICK2;
STICKLINE(注=1ANDC>=MA(C,30),0,MACD,0.7,0),COLORRED;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
{MACD-ABS}
DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
DIFF:DIFF1,COLOR33FF33;
QDIF:DIFF1,COLORRED,LINETHICK1;
{传统KDJ}
KKK:=SMA(RSV,3,1),COLORWHITE,LINETHICK2;
DDD:=SMA(KKK,3,1),COLORYELLOW,LINETHICK2;
JJJ:=3*KKK-2*DDD,COLORMAGENTA,LINETHICK2;
{MACDKDJ金叉共振信号}
AA1:=CROSS(DIFF,DEA)ANDCROSS(KKK,DDD)ANDCROSS(JJJ,DDD);
{共振出现时图标}
DRAWICON(AA1,0.01,38);
DRAWTEXT(AA1,0.03,'MACD&KDJ金叉共振'),COLORWHITE;
{RSI底背}
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>CANDREF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24)ANDCROSS
("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
{RSI顶背}
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<CANDREF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24)ANDCROSS
("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
{RSI顶背信号}
DRAWICON((D3>0),+1.01,37);
DRAWTEXT((D3>0),+1.03,'RSI顶背离'),COLORGREEN;
{RSI底背信号}
DRAWICON((B3>0),-1,38);
DRAWTEXT((B3>0),-1.03,'RSI底背离'),COLORRED;
评论(0)