RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
VARV:=(2*C+H+L)/4;
VARU:=LLV(LOW,30);
VARA1:=HHV(HIGH,30);
B:=EMA((VARV-VARU)/(VARA1-VARU)*100,8);
B1:=EMA(B,5);
多:=B-B1>0;
空:=B-B1<0;
转空:=空 AND REF(多,1);
转多:=多 AND REF(空,1);
转多期:=COUNT(转多,5);
PAstDAYS:=5;
LC:=REF(CLOSE,1);
rsi:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
低吸:=IF(crOSS(RSI,11),70,0);
VAR7:=EMA(AMOUNT/vol/100,3);
VAR8:=EMA(VAR7,88);
VAR9:=EMA(VAR7,88)*0.85;
VARA:=VAR9*0.87;
VARB:=LOW<VARA AND CLOSE>REF(CLOSE,1)*1.02;
坚决买进:=IF(FILTER(VARB,6),65,0);
VARF:=(2*CLOSE+HIGH+LOW)/4;
VA4:=LLV(LOW,34);
VA5:=HHV(HIGH,34);
VA6:=EMA((VARF-VA4)/(VA5-VA4)*100,6);
VA7:=EMA(0.667*REF(VA6,1)+0.333*VA6,4);
出击:=IF(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>0.3 AND COUNT(VA6>VA7,3) AND REF(LOW,1)=LLV(LOW,120) AND
CLOSE>OPEN,1,0),60,0);
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) AND 多>0,MIN(B,B1),0);
VAR10:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR12:=VAR10<REF(VAR11,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
主力进场:=VAR12 AND COUNT(VAR12,30)=1;
主力进场期:=COUNT(主力进场,PASTDAYS);
DIFF:=EMA(C,12)-EMA(C,26),COLORWHITE;
DEA:=EMA(DIFF,8),COLORFFAA00;
macd:=2*(DIFF-DEA);
DIFF上穿0轴:=CROSS(DIFF,0);
MacD金叉:=CROSS(DIFF,DEA);
MACD金叉期:=COUNT(MACD金叉,PASTDAYS);
MACD势增:=MACD>REF(MACD,1);
N:=9;M1:=3;M2:=3;
kdj势增:=J>REF(J,1);
高安全区:=0,COLORRED;
安全区:=20,COLORCYAN;
风险区:=100,COLORGREEN;
kdJ金叉:=CROSS(J,K);
KDJ死叉:=CROSS(K,J);
KDJ买点:=KDJ金叉 ;
KDJ卖点:=KDJ死叉;
KDJ买点期:=COUNT(KDJ买点,PASTDAYS);
通:=MA(C,21);
低吸期:=COUNT(低吸,PASTDAYS);
出击期:=COUNT(出击,PASTDAYS);
坚决买进期:=COUNT(坚决买进,PASTDAYS);
波段买入期:=COUNT(波段买入,PASTDAYS);
转多买点:=(转多期) AND (KDJ金叉 OR MACD金叉);
最佳买点:=(多>0) AND (主力进场期 OR 出击期 OR 坚决买进期 OR 波段买入期) AND (KDJ金叉 OR MACD金叉);
佳:最佳买点;