{MACDMJ副圖}
DRAWGBK(C>0,RGB(0,20,100),RGB(80,80,80),0,'12',0);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
J:="KDJ.J";
JC:=DEA-DIF;
綠柱面積:IF(MACD<0,SUM(0-MACD,BARSLAST(JC<0)),0),NODRAW,COLOR00FF00;
紅柱面積:IF(MACD>0,SUM(MACD,BARSLAST(JC>0)),0),NODRAW,COLOR00FFFF;
A1:=IF(MACD<0,HHV(綠柱面積,BARSLAST(JC<0)),0);
A2:=IF(MACD>0,HHV(紅柱面積,BARSLAST(JC>0)),0);
DRAWNUMBER(CROSS(DIF,DEA),0,REF(A1,1)),COLOR00FF00;
DRAWNUMBER(CROSS(DEA,DIF),0,REF(A2,1)),COLOR00FFFF;
LM:=REF(綠柱面積,BARSLAST(CROSS(DIF,DEA))+1);
HM:=REF(紅柱面積,BARSLAST(CROSS(DEA,DIF))+1);
轉(zhuǎn)強(qiáng):=CROSS(紅柱面積,LM),,COLORFFFF00;
轉(zhuǎn)弱:=CROSS(綠柱面積,HM),,COLOR00FF00;
W1:STICKLINE(MACD>0,MACD,0,0,1),COLORRED;
W2:STICKLINE(MACD<0,MACD,0,0,1),COLORCYAN;
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA;
VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),0.5);
BD:=BARSLAST(FILTERX(CROSS(0,MACD),BARSCOUNT(C)));
前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1);
BDTJ:=IF(MACD<0,FILTERX(MACD=LLV(MACD,BARSLAST(MACD>0)),
BARSCOUNT(C)),DRAWNULL);
TSBDTJ:=BARSLAST(BDTJ);
BDZH:=FILTERX(MACD<CONST(LLV(MACD,BD+1)),BARSCOUNT(C));
BDTS:=BARSLAST(BDZH);
本低:IF(BD+1>=1,CONST(LLV(MACD,BD+1)),DRAWNULL);
BDCL:=CROSS(COUNT(CROSS(MACD>本低/2 AND MACD<0,0.5),TSBDTJ)=1,0.5) AND TSBDTJ>=0;
終點(diǎn):=IF(ISLASTBAR AND MACD>0 AND MACD=HHV(MACD,BARSLAST(MACD<0)),1,
IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(終點(diǎn)=1 OR 終點(diǎn)=2) AND MACD>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
本高:DRAWLINE(ZZ,MACD,REF(ZZ,1),REF(MACD,1),1),COLORWHITE;
橫線:=CONST(REF(MACD,BARSLAST(ZZ)));
WW:=MACD>橫線;
起始點(diǎn):=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
天數(shù):BARSLAST(起始點(diǎn)),COLORYELLOW,NODRAW;
上橫線:DRAWLINE(起始點(diǎn),橫線,ZZ,橫線,0),COLORGREEN,DOTLINE;
下橫線:DRAWLINE(BDZH,CONST(LLV(MACD,BD+1)),BDTJ=1,MACD,0),COLOR8080FF,DOTLINE;
DRAWNUMBER(BDTJ,CONST(LLV(MACD,BD+1))*0.9,BDTS);
DRAWNUMBER(ZZ,上橫線*1.1,天數(shù));
TJ:=IF(起始點(diǎn),BARSNEXT(ZZ),DRAWNULL);
紅柱數(shù)量:IF(天數(shù)>0 AND 天數(shù)<=REF(TJ,天數(shù)),SUM(MACD>0,天數(shù)),DRAWNULL),COLORWHITE,NODRAW;
橫線起始價(jià):REF(C,天數(shù)),NODRAW;
空間評估:(橫線起始價(jià)-C)/C*100,NODRAW;
TT:=BARSLAST(ZZ);
WQG:=CROSS(COUNT(CROSS(MACD<本高/2 AND MACD>0,0.5),ZZ)=1,0.5) AND ZZ>=0;
STICKLINE(MACD>前高 AND 本高>前高 AND BARSLAST(CROSS(MACD<本高/2,0.5))>0 AND
MACD>(前高+本高)/2,MACD,前高,1,0),COLORYELLOW;
前高本高二分位:IF(MACD>0 AND 本高!=前高,DRAWLINE(WQG,(前高+本高)/2,REF(WQG,1),REF((前高+本高)/2,1),1)
,DRAWNULL),COLORC0C000,DOTLINE;
AA:=STRCAT(STRCAT(STRCAT('〖','上升空間'),'〗'),CON2STR(IF(空間評估,空間評估,
DRAWNULL),2));
DRAWTEXT_FIX(C>0,0,1,0,STRCAT(AA,'﹪')),COLORWHITE;
STICKLINE(MACD>前高,MACD,前高,1,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD<前低 AND 前低<0,MACD,前低,1,0),COLORBLUE;
B1:=IF(CROSS(MACD<0,0.5),BARSNEXT(BDTJ),DRAWNULL);
TSB1:=BARSLAST(MACD>0)-1;
STICKLINE(BARSLAST(BDCL)>=0 AND MACD<前低 AND MACD<0,MACD,前低,1,0),COLORGREEN;
STICKLINE(BDCL,MACD,0,1,0),COLORWHITE;
STICKLINE(MACD>前高 AND 本高>前高 AND BARSLAST(WQG)>0,
MACD,前高,1,0),COLORRED;
DRAWTEXT(VA2 AND VA2!=UU,(MACD/10)*9,'前');
DRAWTEXT(VA2 AND VA2!=UU,MACD/10,'高');
DRAWTEXT(ZZ,(MACD/10)*9,'本'),COLORWHITE;
DRAWTEXT(ZZ,MACD/10,'高'),COLORWHITE;
DRAWTEXT(BDTJ,(MACD/10)*9,'低'),COLORRED;
DRAWTEXT(BDTJ,MACD/10,'本'),COLORRED;
IF(BARSLAST(BDCL)>=0,本低/2,DRAWNULL),COLORRED,DOTLINE;
JCB:=CROSS(DIF,DEA);
JTS:=BARSLAST(DIF<DEA);
SC:=CROSS(DEA,DIF);
STS:=BARSLAST(DIF>DEA);
中線:=EMA(C,10),COLOR0F00FF,LINETHICK0;
升線: STD(中線,7),COLOR0000FF,DOTLINE,COLORCYAN;
降線: -STD(中線,7),COLORGREEN,DOTLINE,LINETHICK1;
IF(升線>REF(升線,1)AND NOT(C<中線),升線,DRAWNULL),COLORRED ,LINETHICK2;
IF(降線>REF(降線,1)AND NOT(C>中線),降線,DRAWNULL),COLORRED ,LINETHICK2;
IF(降線<REF(降線,1),降線,DRAWNULL),COLOR00FF00 ,LINETHICK2;
IF(升線>REF(升線,1)AND NOT(C<中線),升線,DRAWNULL),COLORYELLOW ,CIRCLEDOT,LINETHICK2;
IF(升線>REF(升線,1)AND NOT(C<中線),降線,DRAWNULL),COLORYELLOW ,CIRCLEDOT,LINETHICK2;
IF(降線>REF(降線,1)AND NOT(C>中線),降線,DRAWNULL),COLORFFFF00 ,CIRCLEDOT,LINETHICK2;
STICKLINE(轉(zhuǎn)強(qiáng)>0,降線,升線,0.01,0),COLORGREEN;
STICKLINE(轉(zhuǎn)弱>0,降線,升線,0.11,0),COLOR0077FF;
DRAWTEXT(轉(zhuǎn)強(qiáng),降線-0.01,'↖平前綠柱面積'),COLORGREEN;
DRAWTEXT(轉(zhuǎn)弱,降線-0.01,'↖平前紅柱面積'),COLOR0077FF;
W3:=STICKLINE(MACD>0 AND MACD>前高 AND 前高>0,MACD,前高,2,0),COLORYELLOW;
W4:=STICKLINE(MACD<0 AND MACD<前低 AND 前低<0,MACD,前低,2,0),COLORGREEN;
W5:DRAWTEXT(REFX(VA2,1),降線,'界'),COLORWHITE;
W6:DRAWTEXT(REFX(VA2,1),升線,'高'),COLORWHITE;
W7:DRAWTEXT(REFX(VA2,1),0,'臨'),COLORWHITE;
W10:DRAWTEXT(REFX(VA4,1),升線,'低'),COLORYELLOW;
W8:DRAWTEXT(REFX(VA4,1),降線,'界'),COLORYELLOW;
W9:DRAWTEXT(REFX(VA4,1),0,'臨'),COLORYELLOW;
NJ:=0.99;
DIFJ:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEAJ:=EMA(DIFJ,9);
MACDJ:=(DIFJ-DEAJ)*2;
G:=CONST(IF(CURRBARSCOUNT<=81,HHV(H,BARSLAST(CURRBARSCOUNT=81)),0));
D:=CONST(IF(CURRBARSCOUNT<=81,LLV(L,BARSLAST(CURRBARSCOUNT=81)),0));
金叉:=REFX(CROSS(DIFJ,DEAJ),1);
DRAWICON(金叉>0,0,降線);
DRAWICON(金叉>0,0,23);
STICKLINE(金叉,0,DEA,0,-1);
聯(lián)系客服