MACD背离指标(源码、附图)介绍
MACD背离指标(源码、附图)
MACD背离指标供交流用,从指示的情况来看主力就是利用散户对MACD的迷信,故意制造假象,迷惑散户。所以使用要注意的原则是:该涨不涨就逃,该跌不跌就进。
源码:
DIF:="MACD.DEA";
VAR4:=(LOW+HIGH+CLOSE)/3;
GJ:= MA(VAR4,5);
DISG:=REF(DIF,1)<REF(DIF,2) AND REF(DIF,1)<DIF;
DIXG:=REF(DIF,1)>REF(DIF,2) AND REF(DIF,1)>DIF;
DISN:=BARSLAST(DISG);DIXN:=BARSLAST(DIXG);
QISN:=DIXN+REF(DISN,DIXN)+1;QIXN:=DISN+REF(DIXN,DISN)+1;
DBN1:=DISN=0 AND REF(DIF,1)<REF(DIF,QISN) AND REF(GJ,1)>REF(GJ,QISN)AND DIXN>3;
DBN2:=DISN=0 AND REF(DIF,1)>REF(DIF,QISN) AND REF(GJ,1)<REF(GJ,QISN)AND DIXN>3;
底背离:DBN1 OR DBN2;
HBN1:=DIXN=0 AND REF(DIF,1)<REF(DIF,QIXN) AND REF(GJ,1)>REF(GJ,QIXN)AND DISN>3;
HBN2:=DIXN=0 AND REF(DIF,1)>REF(DIF,QIXN) AND REF(GJ,1)<REF(GJ,QIXN)AND DISN>3;
HBN:=HBN1 OR HBN2;
顶背离:IF(HBN=0,1,2);
gd14704