N :=10;
SHORT:=9;
LONG:=26;
PASTDAYS:=15;
VA6:=(2*CLOSE+HIGH+LOW)/4;
VA8:=LLV(LOW,34);
VARB:=HHV(HIGH,34);
VARC:=EMA((VA6-VA8)/(VARB-VA8)*100,13);
VARD:=EMA(0.667*REF(VARC,1)+0.333*VARC,2);
生命线:EMA(VARD,N), COLORFF00FF,LINETHICK2;
VAR1:=HHV(HIGH,9)-LLV(LOW,9);
VAR2:=HHV(HIGH,9)-CLOSE;
VAR3:=CLOSE-LLV(LOW,9);
VAR4:=((VAR2)/(VAR1))*(100)-70;
VAR5:=((CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60)))*(100);
VAR6:=((2)*(CLOSE)+HIGH+LOW)/(4);
VAR7:=SMA(((VAR3)/(VAR1))*(100),3,1);
VAR8:=LLV(LOW,34);
VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1);
VAR10:=IF((VAR9 100),VAR9-100,0);
VAR11:=HHV(HIGH,34);
B1:=EMA(((VAR6-VAR8)/(VAR11-VAR8))*(100),8);
B2:EMA(B1,5);
STICKLINE(B1-B2 0,B1,B2,4,0),COLORFFFFFF;
STICKLINE(B1-B2 0,B1,B2,4,0),COLORFFFF52;
SS1:=(LOW+HIGH+CLOSE*2)/4;
SS2:= MA(SS1,4);
SS3:=HHV(SS2,10);
SS4:=MA(SS3,3);
SS5:=1.25*SS4-0.25*SS3;
XKKJ:=IF(SS5 SS3,SS3,SS5);
FF1:=LLV(SS2,10);
FF2:=MA(FF1,3);
FF3:=1.25*FF2-0.25*FF1;
DKKJ:=IF(FF3 FF1,FF1,FF3);
MA13:=MA(C,13);
ZDHM:=CROSS(C,DKKJ) AND CROSS(C,MA13) AND CROSS(C,XKKJ);
ZHM:=CROSS(C,MA13) AND CROSS(C,XKKJ);
大:IF(ZDHM OR ZHM,50,0),COLORYELLOW,POINTDOT;
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);
K1:=EMA(D3,2);
小黑马:IF(CROSS(D1,K1),45,0),COLORFFCC66,POINTDOT;
通:=MA(C,17);
子:=MA(C,26);
通增:通 REF(通,1);
子增:子 REF(通,1);
通子:CROSS(通,子),NODRAW;
DIFF:=EMA(C,SHORT)-EMA(C,LONG),COLORWHITE;
DEA:=EMA(DIFF,8);
:=2*(DIFF-DEA);
DIFF上穿0轴:=CROSS(DIFF,0),NODRAW;
MACD金叉:=CROSS(DIFF,DEA),NODRAW;
MACD金叉期:=COUNT(MACD金叉,PASTDAYS),NODRAW;
N1:=9;
M1:=3;
M2:=3;
:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
K:=SMA(RSV,M1,1),COLORYELLOW,LINETHICK1;
D:=SMA(K,M2,1),COLORCYAN,LINETHICK1;
J:=3*K-2*D,COLORMAGENTA,LINETHICK1;
势增:=J REF(J,1),NODRAW;
MACD势增:=MACD REF(MACD,1),NODRAW;
MACD死叉:=CROSS(DEA,DIFF),NODRAW;
高安全区:=0,COLORRED;
安全区:=20,COLORCYAN;
风险区:=100,COLORGREEN;
KDJ金叉:=CROSS(J,K),NODRAW;
KDJ死叉:=CROSS(K,J),NODRAW;
KDJ买点:=KDJ金叉;
KDJ卖点:=KDJ死叉;
KDJ买点期:=COUNT(KDJ买点,PASTDAYS),NODRAW;
季:=MA(C,60);
午:=MA(C,100);
辰:=MA(C,145);
年:=MA(C,250);
申:=MA(C,320);
亥:=MA(C,732);
卯:=MA(C,455);
MAXC:=MAX(通,MAX(子,MAX(季,MAX(午,MAX(辰,MAX(年,MAX(申,MAX(亥,卯))))))));
大牛:=C =MAXC,NODRAW;
牛启:=CROSS(C,MAXC),NODRAW;
通金:=CROSS(C,通);
子金:=CROSS(C,子);
五金:=CROSS(C,MA(C,5));
十金:=CROSS(C,MA(C,10));
季金:=CROSS(C,季);
庄出:=CROSS(生命线,B2);
庄出期:=COUNT(庄出,PASTDAYS);
DRAWTEXT(庄出,生命线*1.2,庄出),COLORCYAN;
庄吸:=CROSS(B2,生命线),NODRAW;
庄吸期:=COUNT(庄吸,PASTDAYS),NODRAW;
DRAWTEXT(庄吸,生命线*1.2,庄吸),COLORYELLOW;
庄吸天数:=BARSLAST(庄吸 0),NODRAW;
庄出天数:=BARSLAST(庄出 0),NODRAW;
持股:=庄吸天数 庄出天数,NODRAW;
持币:=庄吸天数 =庄出天数,NODRAW;
INSTOCK:IF(持股 0,0,DRAWNULL), COLORRED,LINETHICK4;
INHAND:IF(持股 =0,0,DRAWNULL),,COLORFFFF00,LINETHICK4;
阶段卖点:= (CROSS(生命线,B2) OR CROSS(MIN(通,子),C) OR; MACD死叉) AND (C MIN(通,子)) ;
最佳买点:( (CROSS(B2,生命线) 0 AND C MAX(通,子)) OR (通金+子金) ) AND 通增 0 AND 持股 0,NODRAW;
最佳买点期:COUNT(最佳买点,10),NODRAW;
阶段买点:最佳买点期 0 AND (KDJ金叉+MACD金叉) 0 AND; C MAX(通,子),NODRAW;
STICKLINE(最佳买点,0,生命线*1.1,1,0),COLORWHITE;
STICKLINE(最佳买点,30,生命线,1,0),COLORRED;
STICKLINE(最佳买点,0,生命线*0.8,4,0),COLORRED;
STICKLINE(最佳买点,0,生命线*0.4,8,0),COLORRED;
STICKLINE(最佳买点,0,生命线*0.2,10,0),COLORYELLOW;
STICKLINE(最佳买点,0,生命线*0.1,10,0),COLORFFCC66;
STICKLINE(阶段买点 0 AND 最佳买点 1,0,生命线*1.1,1,0),COLORWHITE;
STICKLINE(阶段买点 0 AND 最佳买点 1,30,生命线,1,0),COLORFFCC66;
STICKLINE(阶段买点 0 AND 最佳买点 1,0,生命线*0.8,4,0),COLORFFCC66;
STICKLINE(阶段买点 0 AND 最佳买点 1,0,小黑马*0.4,8,0),COLORFFCC66;
STICKLINE(阶段买点 0 AND 最佳买点 1,0,生命线*0.2,10,0),COLORFF00FF;
DRAWTEXT(阶段卖点,B2+6, ↓ ),COLORGREEN;
DRAWTEXT(阶段卖点,B2+8, ↓ ),COLORGREEN;