飞狐牛熊副图指标
源码
h0:=v/capital;h1:=V/700000000;h2:=IF(h0=0,h1,h0);
M5:=1.1*(MAX(H,REF(C,1))/MIN(L,REF(C,1))-1);M6:=2.5*MAX(H2,M5);
DK:=DMA(C,M6);
QR:=SMA(20*(DK/REF(DK,1)-1),2,1);
QR1:=EMA(QR,2);
x0:=0.06;x1:=0.24;
c4:=c>=ref(c,1);
c5:=c<=ref(c,1);
牛:if(qr>x0 and QR1>=0.005 AND c4,1,0),stick,LINETHICK4,COLOR0077bb;
疯牛:if(qr>x1 and QR1>=0.005 AND c4,1,0),stick,LINETHICK4,COLOR44bbff;
熊:if(qr<-1*x0 and QR1<=-0.005 AND c5,-1,0),stick,LINETHICK4,COLORbbbb99;
疯熊:if(qr<-1*x1 and QR1<=-0.005 AND c5,-1,0),stick,LINETHICK4,COLORffffdd;
STICKLINE(qr1>=0.003,-0.05,0.05,10,0),COLOR00EE00;
STICKLINE(BETWEEN(qr1,0.003,-0.003),-0.05,0.05,10,0),COLOR00EEEE;
STICKLINE(qr1<=-0.003,-0.05,0.05,10,0),COLOR0000EE;
DRAWTEXT(CROSS(疯牛,0.5) AND COUNT(疯牛>0.5,10)=1,-0.4,'疯牛'),COLOR44bbff;
DRAWTEXT(CROSS(-0.5,疯熊) AND COUNT(疯熊<-0.5,10)=1,0.4,'疯熊'),COLORffffdd;