诺子你个小海豚
2024-11-16 14:54:53
最佳回答
m:=5;mm:=9*m;short:=mm*4/3;long:=mm*26/9;dif:1000*(ema(close,short)-ema(close,long))/abs(ema(close,short));macd:ema(dif,mm),color58ff58;def:2*(dif-macd),colorffff00,linethick0;stickline(def>=0 and def>=ref(def,1),0,def,6,1),color6058ff;stickline(def>=0 and def< ref(def,1),0,def,6,0),color6058ff;stickline(def<0 and def>=ref(def,1),0,def,6,1),colorffff00;stickline(def<0 and def< ref(def,1),0,def,6,0),colorffff00;多头趋势:=if(dif>=0 and macd>=0 or (dif<0 and macd>=0),1,0);空头趋势:=dif<0 and macd<0 or (dif>=0 and macd<0);缩头:=if(def>0 and ref(def,1)>ref(def,2) and def< ref(def,1),1,0);缩脚:=if(def<0 and ref(def,1)< ref(def,2) and def>ref(def,1),1,0);阻力:=if(cross(close,ma(close,20)) or cross(close,ma(close,60)),1,0);支撑:=if(cross(ma(close,20),close) or cross(ma(close,60),close),1,0);做多:=if(cross(macd,dif) and dif>0 and macd>0,1,0);放空:=if(cross(dif,macd) and dif<0 and macd<0,1,0);drawicon(filter(缩头,3) and 缩头,def+0.5,8),linethick1;drawicon(filter(缩脚,3) and 缩脚,def,10),linethick1;bv:=sum(def,0);ba:=if(max(bv,ref(bv,2))<ref(bv,1) or min(bv,ref(bv,2))>ref(bv,1),1,0);bc:=barslast(ba)+1;smacd:=bv-ref(bv,bc);var3:=if(def>0,hhv(abs(def),bc),llv(def,bc));var4:=(def)/20;{图形比例缩小1/20,可修改}var5:=smacd;drawtext(ref(var4,1)>0 and var4<=0 ,ref(var3,1),''+ref(var5,1)){,pxup100},colorgreen;drawtext(ref(var4,1)<0 and var4>=0 ,ref(var3,1),''+ref(abs(var5),1)),{pxdn40,}colorff00ff;drawtext(barscount(c)=2 and var4<0,ref(var3,1),''+abs(var5)),linethick2,colorff00ff{,pxup40};drawtext(barscount(c)=2 and var4>0,ref(var3,1),''+var5),linethick2,colorgreen{,pxdn100};m1:=ref(def,1);jc := macd-dif;绿柱面积:if (def<0,sum(def,barslast(jc<0)),0),linethick0,colorblue,nodraw;红柱面积:if (def>0,sum(def,barslast(jc>0)),0),linethick0,colorred,nodraw; 20210311