网友求助:
DIF:(EMA(CLOSE,12) - EMA(CLOSE,26)),Colorred,LINETHICK,PRECISION2;
DEA:EMA(DIF,9),COLORYELLOW,LINETHICK,PRECISION2;
MACD:2*(DIF-DEA),COLORFFFFFF,LINETHICK,PRECISION2;
RSV14:=(CLOSE - LLV(LOW,14))/(HHV(HIGH,14) - LLV(LOW,14))-0.5;
K14:=SMA(RSV14,3,1),COLORFF00FF,LINETHICK,PRECISION2;
D14:=SMA(K14,3,1),COLORB00000,LINETHICK,PRECISION2;
J14:=3*K14-2*D14;
FILLRGN(DIF>0 AND DIF>=DEA,DIF,DEA),Color000088;
FILLRGN(DIF>0 AND DIF<DEA,DIF,DEA),COLORGRAY;
FILLRGN(DIF<=0 AND DIF<DEA,DIF,DEA),Color33FF33;
FILLRGN(DIF<=0 AND DIF>=DEA,DIF,DEA),ColorFFCCDD;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,2,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR0000BB;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLOR0000DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,3,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,2,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORDDDDDD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLORFFFFFF;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,3,0),COLOR3377AA;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,2,0),COLOR3388BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLOR4499CC;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLOR5599DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,3,0),COLORFF3300;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,2,0),COLORFF5500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF7700;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLORFF9900;
MACDXG2:=REF(count(dif>0 AND MACD<0 AND macd<ref(macd,1),4)=4,1) AND MACD>REF(MACD,1);
STICKLINE(MACDXG2,macd,0,8,0),COLORred;
TRlsx1:= MAX(MAX((hhv(dif,13)-Llv(dif,13)),ABS(REF(dif,1)-hhv(dif,13))),ABS(REF(dif,1)-llv(dif,13)));
trlsx2:=ema(trlsx1,13);
trlsx3:=ref(dif,1)-ref(trlsx2,1);
支撑:hhv(trlsx3,13),PRECISION2,COLORffffff;
PARTLINE(dea<=ref(DEA,1),Dea),COLORff0000,LINETHICK1;
PARTLINE(dea>ref(DEA,1),Dea),COLORYELLOW,LINETHICK1;
PARTLINE(DIF>ref(dif,1),DIF),Colorred,LINETHICK1;
PARTLINE(DIF<=ref(dif,1),DIF),Color008080,LINETHICK1;
difk:=ema(dif,3);
difd:=ema(difk,3);
DKK:4*dif-3*dea,COLORff00ff,PRECISION2,LINETHICK;
DDD:ema(dkk,5),COLOR2588ff,PRECISION2,LINETHICK;
PARTLINE(DKK>ref(DKK,1),DKK),COLORff00ff,LINETHICK1,LINEDOT;
PARTLINE(DKK<=ref(DKK,1),DKK),COLORffffff,LINETHICK1,LINEDOT;
PARTLINE(DDD>ref(DDD,1),DDD),COLOR2255ff,LINETHICK1,LINEDOT;
PARTLINE(DDD<=ref(DDD,1),DDD),COLOR33ff33,LINETHICK1,LINEDOT;
MACDXG1:=ref(cross(0,macd),3) and count(dif>0 and macd<ref(macd,1),4)=4 ;
DRAWICON(MACDXG1,macd*1.15,1),ALIGN;
KDJXG:=REF(COUNT(J14<REF(J14,1),5)>=3,1) AND REF(J14,1)<-0.4 AND J14>REF(J14,1);
DRAWICON(C AND FILTER(KDJXG,3),macd*1.35,8),ALIGN;
DRAWICON(C AND FILTER(KDJXG,3),macd*1.4,8),ALIGN;
DRAWICON(C AND FILTER(KDJXG,3),macd*1.45,8),ALIGN;
解答如下:
DIF:(EMA(CLOSE,12) - EMA(CLOSE,26)),COLORRED,LINETHICK1;
DEA:EMA(DIF,9),COLORYELLOW,LINETHICK1;
MACD:2*(DIF-DEA),COLORFFFFFF,LINETHICK1;
RSV14:=(CLOSE - LLV(LOW,14))/(HHV(HIGH,14) - LLV(LOW,14))-0.5;
K14:=SMA(RSV14,3,1),COLORFF00FF,LINETHICK;
D14:=SMA(K14,3,1),COLORB00000,LINETHICK;
J14:=3*K14-2*D14;
DRAWBAND(DIF,RGB(136,0,0),DEA,RGB(128,128,128));
DRAWBAND(IF(DIF<0,DIF,DRAWNULL),RGB(221,204,255),IF(DIF<0,DEA,DRAWNULL),RGB(51,255,51));
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR0000BB;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLOR0000DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLOR888888;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1.5,0),COLORBBBBBB;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORDDDDDD;
STICKLINE(MACD<=REF(MACD,1) AND MACD>0,0,MACD,0.5,0),COLORFFFFFF;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLOR3377AA;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLOR3388BB;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLOR4499CC;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLOR5599DD;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLORFF3300;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1.5,0),COLORFF5500;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF7700;
STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,0.5,0),COLORFF9900;