后面关于能量的部分有DCLOSE这个未来函数,觉得害怕的去掉即可,不影响雪豹启动信号。其实就是一个标准的MACD底背离的玩意,效果还不错。
简化后的源码如下:
DIFF:=EMA(c,12)-EMA(c,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
MACD:=(DIFF-DEA)*2;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
雪豹启动:IF(底背离,57,0),LINETHICK3,COLORRED;
DRAWTEXT(底背离,54,'←雪豹启动'),COLORWHITE;