SHORT:=26;
LONG:=12;
M:=9;
DIF:=((EMA(CLOSE,SHORT)-EMA(CLOSE,LONG)))*-1;
DEA:=EMA(DIF,M);
macd:=2*(DIF-DEA);
A4:=BArslAST(ref(cross(dif,dea),1));
B1:=ref(c,A4+1)>c and ref(dif,A4+1)<dif and cross(dif,dea);
DRAWTEXT(FILTER(B1>0,5),dif+0.2,’背离’),COLORyellow;
操盘:STICKLINE(MacD>=0 AND MACD>=REF(MACD,1),0,MACD,4,1),COLORRED{COLOR6058FF};
减仓:STICKLINE(MACD>=0 AND MACD< REF(MACD,1),0,MACD,4,0),COLORred{COLOR6058FF};
反弹:STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,4,1),COLORYELLOW{COLORFFFF00};
寻底:STICKLINE(MACD<0 AND MACD< REF(MACD,1),0,MACD,4,0),COLORFFFF00;
空仓:0,COLORWHITE;
if(dif<0,dif,0),coloryellow,linethick2;
if(dif<0,0,dif),colorred,linethick2;
if(dif<dea,dif,dea),COLORWHITE,linethick2;
if(dif>dea,dea,dea),COLORgreen{colorff00ff},linethick2;

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。