TYP := (HIGH + LOW + CLOSE)/3;
CC1:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
MC1:=MA(CC1,3);{K线密码公式网站 WWW.KXMMGZH.COM}
LC :=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
MR1:=MA(RSI1,3);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),LINETHICK2,COLORWHITE;
MK:MA(K,3),LINETHICK2,COLORFF50FF;
A:=CROSS(CC1,MC1) AND CROSS(RSI1,MR1) AND CROSS(K,MK);
B:=(CROSS(CC1,MC1) OR CC1>MC1) AND (CROSS(RSI1,MR1) OR RSI1>MR1);
AA:=(CROSS(RSI1,MR1)OR RSI1>MR1) AND (CROSS(K,MK) OR K>MK);
BB:=(CROSS(CC1,MC1) OR CC1>MC1) AND (CROSS(K,MK) OR K>MK);
GG:=B OR AA OR BB;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
MQS:=DEA>REF(DEA,1) OR (DEA>=0 AND MACD>REF(MACD,1));
DRAWICON(A,100,1),COLORGREEN;
康龙金线:IF(GG AND MQS,K,DRAWNULL),COLORRED,LINETHICK3;
{VAR20:=C-REF(C,1);
VAR21:=100*EMA(EMA(VAR20,6),6)/EMA(EMA(ABS(VAR20),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP1:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN1:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
BT:=(LLV(VAR21,2)=LLV(VAR21,7) AND COUNT(VAR21<0,2) AND CROSS(VAR21,MA(VAR21,2))) AND
REF(DOWN1,1)<REF(DOWN1,2) AND UP1>REF(DOWN1,1);
0,COLORFF00FF;
DRAWTEXT(BT,30,'短牛'),COLOR00FFFF;
TJ1:=REF(DOWN1,1)<REF(DOWN1,2) AND UP1>REF(DOWN1,1) AND C<HHV(H,21)*0.82;
DRAWTEXT(TJ1,20,'中牛'),COLOR0000FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN1,1)<REF(DOWN1,2) AND UP1>REF(DOWN1,1) AND C<HRY33;
DRAWTEXT(TJ2,10,'大牛'),COLORCYAN;
}