飞狐谁都有Ⅰ\谁都有Ⅱ副图指标
源码
{谁都有Ⅰ}
M:=10;
a:=(3*c+l+o+h)/6;
b:=(20*a+19*ref(a,1)+18*ref(a,2)+17*ref(a,3)+16*ref(a,4)+15*ref(a,5)+14*ref(a,6)
+13*ref(a,7)+12*ref(a,8)+11*ref(a,9)+10*ref(a,10)+9*ref(a,11)+8*ref(a,12)
+7*ref(a,13)+6*ref(a,14)+5*ref(a,15)+4*ref(a,16)+3*ref(a,17)+2*ref(a,18)+
ref(a,20))/210;
d:=ma(b,10);
谁都有:(b-d)*4,colorstick;
C1:=HHV(C,115);
C2:=LLV(C,115);
C3:=C1-C2;
C4:=ma((C-C2)/C3-0.5,14)*20;
相对价位:C4,colorstick;
hh:=REF(hhv(c,66),2);
buy:=cross(c,hh) AND (HHV(C,110)/LLV(C,110)-1)*100<45 AND 相对价位<5.666;
sign:=llv(相对价位,35)<-8.9 and CROSS(相对价位,-7.815) and 相对价位<-1.2;
警戒值:if(hhv(相对价位,10)>9,9,if(llv(相对价位,10)<-9,-9,0)),pointdot,LINETHICK3,,COLORRED ;
AA:=10*FILTER(SIGN,41),STICK;
抄底:if(aa>0,15,0) STICK,COLORWHITE;
DRAWICON( 抄底>0,抄底,1 );
DRAWTEXT(抄底>0,12, '★抄底')COLORWHITE ;
追涨:10*filter(buy,41),STICK,COLORYELLOW;
DRAWICON(追涨>0,追涨,1 );
DRAWTEXT(追涨>0,6, '★追涨') ,COLORYELLOW ;
买:=IF(CROSS(b,d) and SUMBARS(谁都有,1)>20 AND REF(谁都有,1)<-0.1,C*0.9,0),STICK;
出击:if(买>0,5,0) STICK,COLORGREEN;
DRAWICON(出击>0,5 ,1 );
DRAWTEXT(出击>0,3, '★出击') ,,COLORGREEN;
MM:=IF(REF(谁都有,1)>谁都有 AND 谁都有>0 ,1,0);
TJ:=MM AND REF(MM,1)=0 AND 谁都有>2;
BB:=TJ*C*0.9,STICK,COLORBLUE;
卖出:if(BB>0,20,0)STICK,COLORMAGENTA;
DRAWICON(卖出>0,20,2);
排序A:if(抄底>0 or 追涨>0 or 出击>0,1,0),STICK,COLORCYAN
{谁都有Ⅱ}
zm:=ma(c,34);
mm:=ref(ma(c,34),5);
x:(zm-mm)/mm*10;
zb1:=(c-zm)/zm;
zb2:=(c-mm)/mm;
y:(zb2-zb1)*10,colorstick;
buy1:=x>ref(x,1) and x>y and y<-0.2 and l>ref(l,1) and y>ref(y,1);
买:=buy1,COLORYELLOW;
sell1:=y<ref(y,1) and y>x and x>0.5 and h<ref(h,1) and x<ref(x,1);
pro:=sell1;
aa:=if(pro=1,-1,0),COLORYELLOW;
卖:if(aa<0,-0.5,0) STICK, ,COLORYELLOW ;
DRAWICON(卖<0,-0.5,2);
排序A:if(买>0,0.5,0) STICK,COLORWHITE;
DRAWICON(排序A>0,0.5,1 );