n1:=3;n2:=5;n3:=8;n4:=13; rsv:=-(hhv(high,n4)-close)/(hhv(high,n4)-llv(low,n4))*100; lwr1:=sma(rsv,n1,1); lwr2:=sma(lwr1,n1,1); a1:=lwr1>lwr2; z1:=lwr1<lwr2; rsv1:=(close-llv(low,n3))/(hhv(high,n3)-llv(low,n3))*100; k:=sma(rsv1,n1,1); ddu:=sma(k,n1,1); a2:=k>ddu; z2:=k<ddu; lc:=ref(close,1); rsi1:=(sma(max(close-lc,0),n2,1))/(sma(abs(close-lc),n2,1))*100; rsi2:=(sma(max(close-lc,0),n4,1))/(sma(abs(close-lc),n4,1))*100; a3:=rsi1>rsi2; z3:=rsi1<rsi2; diff:=ema(close,n3)-ema(close,n4); dea:=ema(diff,n2); a4:=diff>dea; z4:=diff<dea; bbi:=(ma(close,n1)+ma(close,n2)+ma(close,n3)+ma(close,n4))/4; a5:=c>bbi; z5:=c<bbi; mtm:=close-ref(close,1); mms:=100*ema(ema(mtm,n2),n1)/ema(ema(abs(mtm),n2),n1); mmm:=100*ema(ema(mtm,n4),n3)/ema(ema(abs(mtm),n4),n3); a6:=mms>mmm; z6:=mms<mmm; wj:=(h+l+c)/3; v1:=if(h=l,1,h-max(o,c)); v2:=if(h=l,1,max(c,o)-wj); v3:=if(h=l,1,min(o,c)-l); v4:=if(h=l,1,wj-min(c,o)); v5:=vol/if(h=l,4,h-l); v6:=(v1*v5); v7:=(v2*v5); v8:=(v3*v5); v9:=(v4*v5); 买盘:=(v9+v8); 卖盘:=(v6+v7); 买卖差:=买盘-卖盘; ddx:=买卖差; dx:=ma(买卖差,5)*20; ddx1:=sma(dx,3,1); ddx2:=sma(ddx1,3,1); ddx3:=(5*ddx2+4*ref(ddx2,1)+3*ref(ddx2,2)+2*ref(ddx2,3)+ref(ddx2,4))/15; a7:=ddx1>ddx2; z7:=ddx1<ddx2; 量:=v; 换手:=v/capital*100; var1:=vol/((high-low)*2-abs(close-open)); 买盘1:=if(close>open,var1*(high-low),if(close<open,var1*((high-open)+(close-low)),vol/2)); 卖盘1:=if(close>open,0-var1*((high-close)+(open-low)),if(close<open,0-var1*(high-low),0-vol/2)); dlx:=(买盘1-(-卖盘1))/量*换手; dlx1:=sum(dlx,6); dlx2:=ma(dlx1,5); a8:=dlx1>dlx2; z8:=dlx1<dlx2; varr1:=(2*close+high+low)/4; varr2:=ema(ema(ema(varr1,4),4),4); je:=(varr2-ref(varr2,1))/ref(varr2,1)*100; dd:=ma(je,3); kk:=ma(je,1); a9:=kk>dd; z9:=kk<dd; mtr:=sum(max(max(high-low,abs(high-ref(close,1))),abs(ref(close,1)-low)),14); hd :=high-ref(high,1); ldk :=ref(low,1)-low; dmp:=sum(if(hd>0&&hd>ldk,hd,0),14); dmm:=sum(if(ldk>0&&ldk>hd,ldk,0),14); pdi:=dmp*100/mtr; mdi:=dmm*100/mtr; a10:=pdi>mdi; z10:=pdi<mdi; t:=(a1 and a2 and a3 and a4 and a5 and a6 and a7 and a8 and a9 and a10); t1:=t and ref(t,1)=0; tt:=z1 and z2 and z3 and z4 and z5 and z6 and z7 and z8 and z9 and z10; tt1:=tt and ref(tt,1)=0; 十指红柱:=if(t1,10.4,drawnull); k1k:=if(close>=ref(close,1),high-open+close-low+close-ref(close,1),high-open+close-low); k2k:=if(close<=ref(close,1),open-low+high-close+ref(close,1)-close,open-low+high-close); dt:=vol*k1k/(k1k+k2k); kt:=vol-dt; 买量:=sum(dt,1); 卖量:=sum(kt,1); ddxx:=ema(买量-卖量,5)*vol/capital*100; ddxx1:=sma(ddxx,3,1); ddxx2:=sma(ddxx1,3,1); ddxx3:=ema(ddxx2,5); 大单净量:=ddxx>0 and ma(v,5)>ma(ma(v,5),5) and cross(ddxx1,ddxx2); diffx:=( ema(close,12) - ema(close,26))*100; deax:=ema(diffx,9); macd:=2*(diffx-deax); 绿柱消失买入:=stickline(diffx<0,0,diffx,2,0); 红柱消失卖出:=stickline(diffx>=0,0,diffx,2,0); 顺势红柱:=if(diffx>deax,diffx,drawnull); va:=if(close>ref(close,1),vol,-vol); obv:=sum(if(close=ref(close,1),0,va),0); maobv:=ma(obv,30); km:=obv>maobv; tta1:=顺势红柱 and 十指红柱 and km; tta2:=顺势红柱 and 大单净量 and 十指红柱 and km; {stickline(tta1,h,l,0.1,0),coloryellow; stickline(tta1,o,c,3,1),linethick2,coloryellow; drawtext(tta1 or tta2,l*0.97,' 共振'),colorred; drawicon(tta1 or tta2,l*0.99,11); stickline(tta2,o,c,1,0),coloryellow; stickline(tta2,o,c,1.2,0),coloryellow;} x_1s:=pow(10,6)+241230-date; x_2s:=if(x_1s>0,1,0); x_3s:=if(x_1s>0,1,0); x_4s:=hhv(close,10); 起爆线:ema(x_4s,30),colormagenta,linethick2; if(起爆线<=ref(起爆线,1),起爆线,drawnull),colorcyan,linethick2; x_5s:=ema(x_4s,120); x_6s:=ma(close*vol,20); x_7s:=ma(close*vol,60); x_8s:=1000*(x_6s-ref(x_6s,1))/ref(x_6s,1)*2; x_9s:=1000*(x_7s-ref(x_7s,1))/ref(x_7s,1)*2; x_10s:=(x_8s-x_9s)*vol*close/ma(ref(vol*close,1),5); x_11s:=llv(low,200); x_12s:=ema((close-x_11s)/x_11s,30)*100+200; x_13s:=filter(close>=ref(close,1)*1.05 and x_10s>=x_12s/2 and close>=open and (cross(close,起爆线) or (close>起爆线 and ref(low,1)<起爆线)),20); x_14s:=sumbars(x_13s,1)*x_2s; stickline(x_13s,close,open,2,0),coloryellow; stickline(x_14s,ref(close,x_14s-1),ref(close,x_14s-1),2,0),coloryellow; stickline(x_14s,ref(close,x_14s+1),ref(close,x_14s+1),2,0),colorcyan; stickline(x_13s,low-0.46,low-0.65,3.8,0),colorcyan; stickline(x_13s,low-0.44,low-0.65,3.6,0),colorcyan; stickline(x_13s,low-0.42,low-0.65,3.4,0),colorcyan; stickline(x_13s,low-0.4,low-0.65,3.2,0),color444444; stickline(x_13s,low-0.38,low-0.65,3,0),color555555; stickline(x_13s,low-0.36,low-0.65,2.8,0),color666666; stickline(x_13s,low-0.34,low-0.65,2.6,0),color777777; stickline(x_13s,low-0.32,low-0.65,2.4,0),color888888; stickline(x_13s,low-0.3,low-0.65,2.2,0),color999999; stickline(x_13s,low-0.28,low-0.55,2,0),color003300; stickline(x_13s,low-0.26,low-0.55,1.8,0),color004400; stickline(x_13s,low-0.24,low-0.55,1.6,0),color005500; stickline(x_13s,low-0.22,low-0.55,1.4,0),color006600; stickline(x_13s,low-0.2,low-0.55,1.2,0),color007700; stickline(x_13s,low-0.18,low-0.55,1,0),color008800; stickline(x_13s,low-0.16,low-0.55,0.8,0),color009900; stickline(x_13s,low-0.14,low-0.55,0.6,0),color00bb00; stickline(x_13s,low-0.12,low-0.55,0.4,0),color00dd00; stickline(x_13s,low-0.1,low-0.55,0.2,0),colorred; stickline(x_13s,low-0.48,low-0.3,2,0),colorcyan; stickline(x_13s,low-0.48,low-0.3,1.8,0),colorcyan; stickline(x_13s,low-0.48,low-0.3,1.6,0),color000055; stickline(x_13s,low-0.48,low-0.3,1.4,0),color000066; stickline(x_13s,low-0.48,low-0.3,1.2,0),color000077; stickline(x_13s,low-0.48,low-0.3,1,0),color000088; stickline(x_13s,low-0.48,low-0.3,0.8,0),color000099; stickline(x_13s,low-0.48,low-0.3,0.6,0),color0000aa; stickline(x_13s,low-0.48,low-0.3,0.4,0),color0000cc; stickline(x_13s,low-0.48,low-0.3,0.2,0),color0000ee; stickline(x_13s,low-0.38,low-0.3,2,0),color005566; stickline(x_13s,low-0.38,low-0.3,1.8,0),color006677; stickline(x_13s,low-0.38,low-0.3,1.6,0),color007788; stickline(x_13s,low-0.38,low-0.3,1.4,0),color008899; stickline(x_13s,low-0.38,low-0.3,1.2,0),color0099aa; stickline(x_13s,low-0.38,low-0.3,1,0),color00aabb; stickline(x_13s,low-0.38,low-0.3,0.8,0),color00bbcc; stickline(x_13s,low-0.38,low-0.3,0.6,0),color00ccdd; stickline(x_13s,low-0.38,low-0.3,0.4,0),color00ddee; stickline(x_13s,low-0.38,low-0.3,0.2,0),color00eeff; stickline(x_13s,low-0.68,low-0.75,4,0),color111188; stickline(x_13s,low-0.66,low-0.74,3.6,0),color332299; stickline(x_13s,low-0.64,low-0.73,3.2,0),color5533aa; stickline(x_13s,low-0.62,low-0.72,2.8,0),color8844bb; stickline(x_13s,low-0.6,low-0.71,2.4,0),coloraa55cc; stickline(x_13s,low-0.58,low-0.7,2,0),colorcc66dd; stickline(x_13s,low-0.56,low-0.69,1.6,0),coloryellow; stickline(x_13s,low-0.54,low-0.68,1.2,0),coloryellow; mm1:=tta1 or tta2; stickline(tta1 and x_13s,h,l,0.1,0),coloryellow; stickline(tta1 and x_13s,o,c,3,1),linethick2,coloryellow; drawtext(mm1 and x_13s,l*0.97,' 共振'),colorred; drawicon(mm1 and x_13s,l*0.99,11); 
|