DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
macd:(DIF-DEA)*2,COLORSTICK;
低位金叉:=crOSS(DIF,DEA) AND DIF<-0.1;
STICKLINE(低位金叉,0,-0.18,1,0),COLORYELLOW;
DRAWTEXT(低位金叉,-0.15,’ 低位金叉’),COLORRED;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BArslAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,1,0),COLORFF00FF;
DRAWTEXT(二次金叉,-0.3,’ 二次金叉’),COLORFF00FF;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.13,1,0),COLOR00FF00;
DRAWTEXT(底背离,0.18,’ 底背离’),COLOR00FF00;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.51,’三全项’),COLORYELLOW,LINETHICK2;
DRAWTEXT(低位金叉 AND 底背离,0.31,’两全项’),COLORLIBLUE,LINETHICK2;
上翘:IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
下拐:IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORLIBLUE,LINETHICK2;
A3:=BARSLAST(REF(CROSS("rsi.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,-0.3,’RSI底离’),COLORCYAN;{RSI底背离};
{ _最新股票指标公式}
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,0.8,’RSI顶离’),COLORGREEN;{RSI顶背离};
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)