可以更好判断背驰,适合各周期结合运用,结合缠中枢指标运用效果更好。
p:=26;s:=12;m:=9;
var1:="chzhshch@kxian";{处理K线关系}
var2:="chzhshch@bi";{处理笔关系}
var3:="chzhshch@duan";{处理段关系}
DIFF : EMA(CLOSE,s) - EMA(CLOSE,p);
DEA : EMA(DIFF,m);
MACD : 2*(DIFF-DEA), COLORSTICK;
var4:"chzhshch@macds"(macd)/20;{图形比例缩小1/20,可自己修改}
var5:="chzhshch@macdsnum";
drawnumber(ref(var4,1)>0 and var4<=0 ,ref(var4,1),ref(var5,1),0),shift1,colorred;
drawnumber(ref(var4,1)<0 and var4>=0 ,ref(var4,1),ref(abs(var5),1),0),shift1,colorgreen;
drawnumber(islastbar and var4<0,var4,abs(var5),0),align2,colorgreen,pxup25;
drawnumber(islastbar and var4>0,var4,var5,0),align2,colorred,pxdn10;