【通達信】MACD+成交量主圖指標公式
攻城獅 2016.02.06 19:40
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
DIFZ:=EMA(C,12)-EMA(C,26);
DEAZ:=EMA(DIFZ,9);
MACDZ:=8*(DIFZ-DEAZ);
TYNNN:=60;
A1:=REF(HIGH,TYNNN)=HHV(HIGH,2*TYNNN+1); B1:=FILTER(A1,TYNNN);
C1:=BACKSET(B1,TYNNN+1); D1:=FILTER(C1,TYNNN);
A2:=REF(LOW,TYNNN)=LLV(LOW,2*TYNNN+1); B2:=FILTER(A2,TYNNN);
C2:=BACKSET(B2,TYNNN+1); D2:=FILTER(C2,TYNNN);
E1:=(REF(LLV(LOW,2*TYNNN),1)+REF(HHV(HIGH,2*TYNNN),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR ISLASTBAR OR
BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND
COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);
UU:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
RCC:=REF(L,BARSLAST(VV));
DRAWBAND(DIFZ*4+RCC,RGB(155,50,50),EMA(DIFZ*4+RCC,9),RGB(0,50,150));{此句4.0以下版本要刪除}
STICKLINE((RCC+MACDZ)>RCC AND(RCC+MACDZ)<=REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR400080;
STICKLINE((RCC+MACDZ)>RCC AND(RCC+MACDZ)>REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR00FFFF;
STICKLINE((RCC+MACDZ)<=RCC AND(RCC+MACDZ)<=REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLOR008080;
STICKLINE((RCC+MACDZ)<=RCC AND(RCC+MACDZ)>REF(RCC+MACDZ,1),RCC,RCC+MACDZ,1,0),COLORC080FF;
DIFF:=IF(C,EMA(DIFZ*4+RCC,9),DRAWNULL),COLORFFFFFF,LINETHICK1;
DEAA:=IF(C,DIFZ*4+RCC,DRAWNULL),COLORRED,LINETHICK1;
變盤:IF(DIFZ<=REF(DIFZ,1),DIFZ*4+RCC,DRAWNULL),COLOR00FFFF,NODRAW;
HH0:=CONST(HHV(H,120))*1;
LL0:=CONST(LLV(L,120))*1;
MM0:=CONST((HH0+LL0)/2);
HH1:=IF(CONST(C)LL1:=LL0;HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=(HLMAX-HLMIN);
HLMN3:=HHV(V,250)/2;
HLMN4:=HHV(V,250);
VZ:=(V-HLMN3)*HLMN2/HLMN4+HLMN1;
預(yù)測量:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL),COLOR990000,NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,(0-HLMN3)*HLMN2/HLMN4+HLMN1,(預(yù)測量-HLMN3)*HLMN2/HLMN4+HLMN1,2,-1),COLORLIGRAY;
STICKLINE(C>=O,VZ,(0-HLMN3)*HLMN2/HLMN4+HLMN1,1,1),COLOR000099;
STICKLINE(CM5:=(MA(V,5)-HLMN3)*HLMN2/HLMN4+HLMN1,COLORFFFFFF;
M10:=(MA(V,10)-HLMN3)*HLMN2/HLMN4+HLMN1,COLOR00FFFF;
{ Gupang.com 股-旁-網(wǎng)_通達信股票指標公式}
DRAWTEXT(CROSS(ZIG(3,10),REF(ZIG(3,10),1)),LOW*0.99,’B’) , COLORRED,LINETHICK1;
DRAWTEXT(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),HIGH*1.008,’S’) , COLORGREEN,LINETHICK1;
給:=EMA(C,2),COLORRED;
力:=EMA(SLOPE(C,9)*20+C,37);
買:=CROSS(給,力);
賣:=CROSS(力,給);
DRAWICON(買,L*0.97,1);
DRAWTEXT(買,L*0.95,’進攻’),COLORYELLOW;
DRAWICON(賣,H*1.03,2);
DRAWTEXT(賣,H*1.08,’撤退’),COLORWHITE;
STICKLINE(給>=力,LOW,HIGH,0.01,0),COLOR0000DD;
STICKLINE(給>=力,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(給>=力,LOW,HIGH,0.01,0),COLOR0000DD;
STICKLINE(給>=力,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(給<力,LOW,HIGH,0.01,0),COLORFFDD00;
STICKLINE(給<力,CLOSE,OPEN,2,0),COLORFFFF00;
STICKLINE(CROSS(給,力),OPEN,CLOSE,2.5,0),COLORYELLOW;
STICKLINE(CROSS(力,給),OPEN,CLOSE,2.5,0),COLORWHITE;
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://www.chiang1015.com/ 上發(fā)表,為其獨立觀點。不代表本網(wǎng)立場,不代表本網(wǎng)贊同其觀點,亦不對其真實性負責,投資決策請建立在獨立思考之上。