文华鳄鱼分形指标
aa:=(high+low)/2; ss:ref(sma(aa,5,1),3),colorgreen; zz:ref(sma(aa,8,1),5),colorred; xx:ref(sma(aa,13,1),8),colorblue; tmp:=open-close; drawline(tmp>0.00001,high,tmp>0.00001,open,colorcyan); drawline(tmp>0.00001,low,tmp>0.00001,close,colorcyan); drawline(tmp<-0.00001,high,tmp<-0.00001,close,colorred); drawline(tmp<-0.00001,low,tmp<-0.00001,open,colorred); drawline(abs(tmp)<0.00001,low,abs(tmp)<0.00001,open,colorwhite); drawline(abs(tmp)<0.00001,high,abs(tmp)<0.00001,open,colorwhite); stickline(tmp>0,open,close,colorcyan,0); stickline(tmp<=0,open,close,colorred,1); ho:=high>ref(high,1) && high>ref(high,2) && high>=refx(high,1) && if(high=refx(high,2),high>refx(high,3),high>refx(high,2)); fxh:=cross(ho,0.9); hh:=ref(high,barslast(fxh)); lo:=low<ref(low,1) && low<ref(low,2) && low<=refx(low,1) && if(low=refx(low,2),low<refx(low,3),low<refx(low,2)); fxl:=cross(lo,0.9); ll:=ref(low,barslast(fxl)); stickline(close,hh,hh+0.01,colormagenta,0); stickline(close,ll,ll+0.01,colorgreen,0); drawtext(cross(high,ref(hh,1))&&ref(hh,1)>zz,low-(high-low), "b"),coloryellow; drawtext(cross(ref(ll,1),low)&&ref(ll,1)<zz,high+(high-low), "s"),coloryellow; //AC指标//
y:=(high+low)/2;
ac:ma((ma(y,5)-ma(y,34))-ma(ma(y,5)-ma(y,34),5),5); {put in the same window and plot green} acgreen:=if(ac>ref( ac,1) ,ac,0 ),colorred; stickline(ac<ref(ac,1),0,ac,colorgreen,1); {put in its on window as a histogram and plot red} acred:=if(ac<ref( ac,1) ,ac,0 ),colorgreen; stickline(ac>ref(ac,1),0,ac,colorred,1); ac1:=ref(ac,1); buy1:= ref(ac,2)<ref(ac,3) and ref(ac,1)>ref(ac,2) and ac>ref(ac,1) and ref(ac,2)>0; {drawicon(buy1,ac,4);} drawtext(buy1,ac, "b"),colorwhite; buy3:=ref(ac,3)<ref(ac,4) and ref(ac,2)>ref(ac,3) and ref(ac,1)>ref(ac,2) and ac>ref(ac,1) and ref(ac,1)<0; {drawicon(buy3,ac,4);} drawtext(buy3,ac, "b"),colorwhite; buy4:=ref(ac,2)<ref(ac,3) and ref(ac,1)>ref(ac,2) and ac>ref(ac,1) and ref(ac,1)<0 and ac>0; {drawicon(buy4,ac,4);} drawtext(buy4,ac, "b"),colorwhite; s1:= ref(ac,2)>ref(ac,3) and ref(ac,1)<ref(ac,2) and ac<ref(ac,1) and ref(ac,2)<0; {drawicon(s1,ac,5);} drawtext(s1,ac, "s"),colorwhite; s3:=ref(ac,3)>ref(ac,4) and ref(ac,2)<ref(ac,3) and ref(ac,1)<ref(ac,2) and ac<ref(ac,1) and ref(ac,1)>0; {drawicon(s3,ac,5);} drawtext(s3,ac, "s"),colorwhite; s4:=ref(ac,2)>ref(ac,3) and ref(ac,1)<ref(ac,2) and ac<ref(ac,1) and ref(ac,1)>0 and ac<0; {drawicon(s4,ac,5);} drawtext(s4,ac, "s"),colorwhite; //AO指标//
var1:=(high+low)/2; ao:ma(var1,5)-ma(var1,34); aogreen:=if(ao>ref(ao,1),ao,0),colorred; stickline(ao>=ref(ao,1),0,ao,colorred,1),colorred; aored:=if(ao<ref( ao,1),ao,0),colorgreen; stickline(ao<ref(ao,1),0,ao,colorgreen,1),colorgreen; signalline:=ma(ao,5),colorblue; s1:=cross(0,ao); {drawicon(s1,ao,5);} drawtext(s1,ao,"s"),colorwhite; {//----------------------------以上是下穿0信号;} s2:=ao<0 and ref(ao,1)>ref(ao,2) and ao<ref(ao,1); {drawnumber(1>0,ao,lu2,0);} {drawicon(s2,ao,5);} drawtext(s2,ao,"s"),colorwhite; {//-----------------------------以上碟型卖出信号;} scount:=barslast(ao<0);{//上一次ao>0后到现在的周期数;} {//drawnumber(1>0,ao-0.1,scount,0);} sd:=hhv(ao,scount);{//求上面周期的最大ao;} scountd:=hhvbars(ao,scount);{//求最大值到现在的周期数;} {//drawnumber(1>0,ao-0.3,scountd,0);} s3:=ao>0 and ref(ao,1)>ref(ao,2) and ao<ref(ao,1);{//满足峰的条件;} s31:=count(s3,scountd);{//满足上面条件的次数;} {//drawnumber(1>0,ao-0.5,s31,0);} {drawicon(s31>=2 and s3,ao,5);} drawtext(s31>=2 and s3,ao,"s"),colorwhite; {//----------------------------以上是双峰卖出信号;} b1:=cross(ao,0); {drawicon(b1,ao,4);} drawtext(b1,ao,"b"),colorwhite; {//----------------------------以上是上穿0信号;} b2:=ao>0 and ref(ao,1)<ref(ao,2) and ao>ref(ao,1) ; {drawnumber(1>0,ao,lu2,0);} {drawicon(b2,ao,4);} drawtext(b2,ao,"b"),colorwhite; {//-----------------------------以上碟型买入信号;} bcount:=barslast(ao>0);{//上一次ao>0后到现在的周期数;} {//drawnumber(1>0,ao-0.1,bcount,0);} bd:=llv(ao,bcount);{//求上面周期的最小ao;} bcountd:=llvbars(ao,bcount);{//求最小值到现在的周期数;} {//drawnumber(1>0,ao-0.3,bcountd,0);} b3:=ao<0 and ref(ao,1)<ref(ao,2) and ao>ref(ao,1);{//满足峰的条件;} b31:=count(b3,bcountd);{//满足上面条件的次数;} {//drawnumber(1>0,ao-0.5,lu31,0);} {drawicon(b31>=2 and b3,ao,4);} drawtext(b31>=2 and b3,ao,"b"),colorwhite; {//----------------------------以上是双峰买进信号;} //gator//
var1:=(high+low)/2; xx:=sma(var1,13,1); zz:=sma(var1,8,1); ss:=sma(var1,5,1); zx:=ref(if(zz>xx,zz-xx,xx-zz),5); zs:=ref(if(zz<ss,zz-ss,ss-zz),3); stickline(zx<ref(zx,1),0,zx,colorgreen,1); stickline(zx>ref(zx,1),0,zx,colorred,1); stickline(zx>ref(zs,1),0,zs,colorgreen,1); stickline(zs<ref(zs,1),0,zs,colorred,1); |
|