YTHEeeeee
2024-11-16 09:48:31
最佳回答
您好,难听的话说前头,这个指标有未来函数。最好别用。但是我还是把指标改好了,短牛中牛大牛,自己选股的时候组合一下就好了。对了,通常含有未来函数的指标都有很多无用的代码,恕我私自把没用的代码都删除了。 再说一次,有未来函数的话,信号会漂移的。 var1:=c-ref(c,1); var2:=100*ema(ema(var1,6),6)/ema(ema(abs(var1),6),6); ma5:=ema(c,5); ma13:=ema(c,13); up:drawline(l=llv(l,barslast(cross(ma13,ma5))+1),llv(l,barslast(cross (ma13,ma5))+1),h=hhv(h,barslast(cross(ma5,ma13))+1),hhv(h,barslast(cross (ma5,ma13))+1),0) ; down:drawline(h=hhv(h,barslast(cross(ma5,ma13))+1),hhv(h,barslast(cross (ma5,ma13))+1),l=llv(l,barslast(cross(ma13,ma5))+1),llv(l,barslast(cross (ma13,ma5))+1),0) ; bt:=(llv(var2,2)=llv(var2,7) and count(var2<0,2) and cross(var2,ma(var2,2))) and ref(down,1)<ref(down,2) and up>ref(down,1); stickline(bt,0,3,0.22,0),color0000ff; drawtext(bt,3,'短牛'),color0000ff; tj1:=ref(down,1)<ref(down,2) and up>ref(down,1) and c<hhv(h,21)*0.82; stickline(tj1,0,2,0.2,0),colorff00ff; drawtext(tj1,2,'中牛'),colorff00ff; hr:=hhv(high,55); hry:=llv(low,55); hry11:=hr*hry; hry33:=sqrt(hry11); tj2:= ref(down,1)<ref(down,2) and up>ref(down,1) and c<hry33; stickline(tj2,0,1,0.2,0),color00ffff; drawtext(tj2,1,'大牛'),color00ffff; st:=ref(up,1)>ref(up,2) and down<ref(up,1); stickline(st,10,9,0.2,0),color00ff00; drawtext(st,9,'卖'); 短牛:bt; 中牛:tj1; 大牛:tj2; 20210311