编写要求:
DIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA1:=EMA(DIF1,9);
MACD1:=2*(DIF1-DEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.5,0),COLOR0000AA;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.2,0),COLOR0000CC;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.6,0),COLOR0000DD;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.1,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.5,0),COLOR00AA00;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.2,0),COLOR00CC00;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.6,0),COLOR00DD00;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.1,0),COLORGREEN;
STICKLINE(MACD10,0,MACD1,2.5,0),COLORAAAAAA;
STICKLINE(MACD10,0,MACD1,1.2,0),COLORCCCCCC;
STICKLINE(MACD10,0,MACD1,0.6,0),COLORDDDDDD;
STICKLINE(MACD10,0,MACD1,0.1,0),COLORFFFFFF;
STICKLINE(MACD1=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIF:DIF1,COLOR33FF33;
DEA:DEA1,COLORYELLOW;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIF1>=DEA1,DIF1,DRAWNULL),COLORRED,LINETHICK2;
金叉1:=CROSS(DIF1,DEA1);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:SMA(RSV,3,1),COLORFFFFFF;
D:SMA(K,3,1),COLOR00FFFF;
J:3*K-2*D,COLOR363670;
强1:IF(J>=K,J,DRAWNULL),COLORFF00FF,LINETHICK2;
金叉2:=CROSS(J,K);
DRAWICON(金叉1 AND 金叉2,J,17);
DRAWTEXT(REF(MACD1,1)>0 AND MACD1<0,MACD1-0.01,'1');
DRAWTEXT(REF(MACD1,2)>0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'2');
DRAWTEXT(REF(MACD1,3)>0 AND REF(MACD1,2)<0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'3');
DRAWTEXT(REF(MACD1,4)>0 AND REF(MACD1,3)<0 AND REF(MACD1,2)<0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'4');
DRAWTEXT(REF(MACD1,5)>0 AND REF(MACD1,4)<0 AND REF(MACD1,3)<0 AND REF(MACD1,2)<0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'5');
DRAWTEXT(REF(MACD1,6)>0 AND REF(MACD1,5)<0 AND REF(MACD1,4)<0 AND REF(MACD1,3)<0 AND REF(MACD1,2)<0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'6');
DRAWTEXT(REF(MACD1,7)>0 AND REF(MACD1,6)<0 AND REF(MACD1,5)<0 AND REF(MACD1,4)<0 AND REF(MACD1,3)<0 AND REF(MACD1,2)<0 AND REF(MACD1,1)<0 AND MACD1<0,MACD1-0.01,'7');
DRAWTEXT(REF(MACD1,1)<0 AND MACD1>0,MACD1+0.01,'1'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,2)<0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'2'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,3)<0 AND REF(MACD1,2)>0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'3'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,4)<0 AND REF(MACD1,3)>0 AND REF(MACD1,2)>0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'4'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,5)<0 AND REF(MACD1,4)>0 AND REF(MACD1,3)>0 AND REF(MACD1,2)>0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'5'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,6)<0 AND REF(MACD1,5)>0 AND REF(MACD1,4)>0 AND REF(MACD1,3)>0 AND REF(MACD1,2)>0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'6'),COLOR00FFFF;
DRAWTEXT(REF(MACD1,7)<0 AND REF(MACD1,6)>0 AND REF(MACD1,5)>0 AND REF(MACD1,4)>0 AND REF(MACD1,3)>0 AND REF(MACD1,2)>0 AND REF(MACD1,1)>0 AND MACD1>0,MACD1+0.01,'7'),COLOR00FFFF;
解答:
?