主图
上:WMA(SMA(HHV(H,28),9/2,1),3)COLORGREEN,LINETHICK2;
下:WMA(SMA(LLV(L,28),9/2,1),3)COLORMAGENTA,LINETHICK2;
通道:(上+下)/2,COLORWHITE;
LC:=REF(C,1);
RSI5:=SMA(MAX(C-LC,0),5,1)/SMA(ABS(C-LC),5,1)*100;
逃命:=CROSS(80,RSI5);
DRAWICON(逃命,H*1.03,15);
TJ1:=REF("CCI.CCI",1)>90 AND "CCI.CCI"<REF("CCI.CCI",1);
TJ2:=REF("KDJ.J"(9,3,3),1)>90 AND "KDJ.J"(9,3,3)<REF( "KDJ.J"(9,3,3),1);
TJ3:=REF("RSI.RSI1",1)>70 AND "RSI.RSI1"<REF("RSI.RSI1",1);
TJ4:=COUNT(TJ1,5) AND COUNT(TJ2,5) AND COUNT(TJ3,5);
低:=REF(LLV(L,150),3);
近期底:=REFDATE(低,DATE);
最底:=REFDATE(近期底,DATE);
入:=最底=L AND ((C+L)<(O+C) OR (O+L)<(C+O));
STICKLINE(入,H,L,1,0),COLORYELLOW;
DRAWTEXT(入,L*0.08,'黄底'),COLORLIMAGENTA;
副图1
DRAWGBK(CLOSE>0,RGB(0,108,108),RGB(88,0,0),0,5,0);
月DIF:"MACD.DIF#MONTH"COLORMAGENTA,DOTLINE;
月DEA:"MACD.DEA#MONTH"COLORGREEN,DOTLINE;
周DIF:"MACD.DIF#WEEK";
周DEA:"MACD.DEA#WEEK";
STICKLINE(月DIF>月DEA AND 月DEA<0 AND 月DIF<0 AND {周DIF>=REF(周DIF,5) AND} ABS(月DIF)<ABS(月DEA-月DIF),月DIF,0,4,0 ),COLORCCCCCC;
DRAWBAND(月DIF,RGB(110,50,0),月DEA,RGB(0,160,50));
DRAWBAND(周DIF,RGB(180,160,221),周DEA,RGB(10,100,100));
{萎缩:=(周DIF-周DEA)<=(REF(周DIF,5)-REF(周DEA,5)) AND 周DIF>周DEA;
萎缩1:=(月DIF-月DEA)<=(REF(月DIF,20)-REF(月DEA,20)) AND 月DIF>月DEA;
DRAWICON(萎缩,周DIF,2);
DRAWICON(萎缩1,月DIF,2);}
月条件:=月DIF>0 AND 月DEA<0.15 AND 周DIF>=REF(周DIF,5);
周条件:=周DIF>0 AND 周DEA<0 AND 月DIF>月DEA AND 周DIF>=REF(周DIF,5) AND REF(周DIF,5)>=REF(周DIF,10) AND ABS(月DIF)-ABS(周DEA)<0.7 AND 周DEA>=月DIF;
NOTEXTDIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
NOTEXTDEA1:=EMA(NOTEXTDIFF1,9);
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED;
DEA:EMA(DIF,9),COLORLIBLUE;
MACD:2*(DIF-DEA),COLORSTICK;
DRAWBAND((DIF>REF(DIF,1) AND DIF>0 AND DEA>0 AND DIF>DEA AND MACD>DIF AND MACD>=REF(MACD,1))*ABS(MACD),RGB(200,0,0),0,RGB(200,0,0));
DRAWICON(月条件,月DIF,42);
DRAWICON(周条件,周DIF,11);
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
DRAWICON(顶背离,DEA,2);
副图2
DRAWGBK(CLOSE>0,RGB(0,108,108),RGB(88,0,0),0,5,0);DIFF :=( EMA(CLOSE,12) - EMA(CLOSE,26))*100;
DEA :=EMA(DIFF,9);
MACD :=2*(DIFF-DEA);
绿柱消失买入:STICKLINE(DIFF<0,0,DIFF,2,0),COLOR00FF00;
红柱消失卖出:STICKLINE(DIFF>=0,0,DIFF,2,0),COLORRED;
STICKLINE(DEA>=0,0,DEA,2,0),COLORBLUE;
STICKLINE(DEA<0,0,DEA,2,0),COLORYELLOW;
DRAWICON(CROSS(DIFF,DEA),DEA*1.1,1);
DRAWICON(CROSS(DEA,DIFF),DEA*1.1,2);
强1:IF(DIFF>DEA,DIFF,DRAWNULL),COLORRED,LINETHICK2;
强2:IF(DEA<DIFF,DEA,DRAWNULL),COLORMAGENTA,LINETHICK2;
抄底:=ABS((CROSS("MACD.DIF","MACD.DEA")
&&"MACD.DEA"<=-0.07)*"MACD.DIF")*1.09,COLORLIMAGENTA,LINETHICK2;
DRAWTEXT(ABS(抄底)>0,抄底,' 抄底'),COLORRED;
DRAWICON(ABS(抄底)>0,抄底,9);
副图3
DRAWGBK(CLOSE>0,RGB(0,108,108),RGB(88,0,0),0,5,0);
低:=REF(LLV(L,150),3);
低点:=REFDATE(低,DATE);
黄底:(低点=L AND ((C+L)<(O+C) OR (O+L)<(C+O)));