大趋势H1:EMA(CLOSE,8),COLORWHITE;
H2:EMA(大趋势H1,18),COLORYELLOW;
H3:EMA(CLOSE,108),COLORGREEN;
STICKLINE(大趋势H1>H2,大趋势H1,H2,1,1),COLORRED;
A:=(3*CLOSE+LOW+OPEN+HIGH)/6;
D1:=(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))/211;
D2:=EMA(D1,2);
D3:=EMA(D2,2);
FK1:=EMA(D3,2);
买入:=crOSS(D1,FK1);
散户:=100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55));
RSV:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
主力:=EMA(J,6);
金叉:=CROSS(主力,散户);
VAR1:=MA(C,5)>REF(MA(C,5),1) AND REF(C>O OR C
VAR4:=VAR1 AND VAR2 AND VAR3;
VAR5:=COUNT(VAR4,2)>0;
发现龙头:=金叉 AND VAR5 AND 买入 ;
DRAWTEXT(发现龙头,LOW*0.97,'▲发现龙头'),COLORCYAN;
STICKLINE(发现龙头,H,L,1,0),LINETHICK2,COLORWHITE;
STICKLINE(发现龙头,O,C,3,1),LINETHICK2,COLORWHITE;