根据题意,选股公式如下:dif:=ema(close,12)-ema(close,26);dea:=ema(dif,9);macd:=(dif-dea)*2;均macd:=ema(macd,5);a1:=barslast(ref(cross(macd,均macd),1));金叉底背:=ref(close,a1+1)>close and macd>ref(macd,a1+1) and cross(macd,均macd);a2:=barslast(ref(cross(均macd,macd),1));死叉顶背:=ref(close,a2+1)<close and ref(macd,a2+1)>macd and cross(均macd,macd);金叉底背 or 死叉顶背; 20210311
diff:=ema(close,5)-ema(close,24);dea:=ema(diff,5);a2:=barslast(ref(cross(dea,diff),1));顶背离:=ref(close,a2+1)<close and ref(diff,a2+1)>diff and cross(dea,diff);count(顶背离,5)>=1 and cross(diff,de...
j:="kdj.j";b1:=ref(j,1)=hhv(j,7) ;a2:=barslast(ref(b1,1));a3:c>ref(c,a2) and b1 and j<ref(j,a2) ;这个指标会滞后一根k线显示,因为当前是很难判断j 值是不是成了一个峰,所以就再加了一个条件就是其后一个周期的是j值会小于前一周期的j值,如此就形成了一个峰。补充:因为如果那个...