用了很长时间的辅助工具,看图就明白了。有文字的直接提示,有柱子长短的画线比较,峰谷双线高低的比较。
DIF:EMA(C,12)-EMA(C,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORMAGENTA,DOTLINE ;
STICKLINE(MACD>前高,MACD,前高,1,0),COLORYELLOW;
QG:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
终点:=IF(ISLASTBAR AND MACD>0 AND MACD=HHV(MACD,BARSLAST(MACD<0)),1,IF(FILTERX(QG,BARSCOUNT(C)),2,DRAWNULL));
UU:=(终点=1 OR 终点=2) AND MACD>0;
ZZ:=FILTERX(UU,BARSCOUNT(C));
横线:=CONST(REF(MACD,BARSLAST(ZZ)));
WW:=MACD>横线;
起始点:=FILTERX(REFX(BARSLAST(WW),1)=1,BARSCOUNT(C));
上线:DRAWLINE(起始点,横线,ZZ,横线,0),COLORGREEN;
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
强度:IF(DIFF>=DEA,DIFF,DRAWNULL),COLORRED;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
VV:=CLOSE>OPEN AND MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,10)>MA(CLOSE,30)
AND DIFF>DEA AND MACD>REF(MACD,1) AND DIFF>0 AND DEA>0 AND
MA(VOL,5)>MA(VOL,34) AND MA(CLOSE,30)>=REF(MA(CLOSE,30),1);
佛手:=IF(VV,1,0);
二次翻红:=(FH3 OR FH4 OR FH5);
低买:=CROSS(DIF,DEA) AND DIF<0;
加油:=CROSS(DIF,DEA) AND DIF>0;
DRAWTEXT(二次翻红,-0.15,'↖翻红'),COLORRED;
DRAWTEXT(CROSS(DIF,DEA) AND DIF<0,DEA-0.02,'↖低买'),COLORFF00FF;
DRAWTEXT(CROSS(DIF,DEA) AND DIF>0,DEA-0.05,'↖加油'),COLORRED;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.13,2,0),COLOR00FF00;{好股票WWW.GOODGUPIAO.COM}
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;
DRAWTEXT(底背离,0.1,' 底背离'),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;
201911179171479776.jpg
201911179171929228.jpg
|