RI:=(INDEXC/REF(INDEXC,1))-1;
SI:=(CLOSE/REF(CLOSE,1))-1;
CI:=REF(CLOSE,1)*(1+RI);
GAIN:=CLOSE-(CI);
ROUTE:=ABS(CI-REF(CLOSE,1))+ABS(CLOSE-(CI));
FH:=IF((SI)>0,1,0-1);
ZM:=IF((ABS(RI)<0.008) AND (ABS(SI)<0.008) AND (ABS(RI-SI)<0.015),0.35*FH*VOL,0.5*GAIN/ROUTE*VOL);
ZMF:=SUM(ZM,0);
(EMA(ZMF,1)-EMA(ZMF,10))/100, COLORSTICK,linethick3;
Var1:=REF(MA(CLOSE,21),10);
开:=OPEN-Var1;
高:=HIGH-Var1;
低:=LOW-Var1;
收:=CLOSE-Var1;
MID:=MA(CLOSE,20);
UPPER:=MID+2*STD(CLOSE,20);
LOWER:=MID-2*STD(CLOSE,20);
V1:=(CLOSE-LOWER)/(UPPER-LOWER)*100;
V2:=V1-EMA(V1,5);
K1:=SUM(LLV(V2,4),4)/4;
V3:=EMA(V2,64)*10;
V4:=EMA(0.4*V2*(-1),3);
V5:=-1*EMA(V2,39)*10;
A:=V3>10;
B:=V2>V4;
D:=V5>10;
E:=V3<=10 OR V2<=V4 OR V5<=10;
牛熊分界:STICKLINE(CLOSE,0,0,6,0),coloryellow;
STICKLINE(收>=开 AND E,高,低,0,0), colorred;
STICKLINE(收>=开 AND E,收,开,5,0) ,colorred;
STICKLINE(收< 开 AND E,高,低,0,0), colorgreen;
STICKLINE(收< 开 AND E,收,开,5,0), colorgreen;
变盘拐点:STICKLINE(开> 收 AND A,低,高,0,0),colorgreen;
STICKLINE(开> 收 AND A,收,开,5,0),colorgreen;
STICKLINE(开<=收 AND A,低,高,0,0),colorgreen;
STICKLINE(开<=收 AND A,收,开,5,0);
强势上攻:STICKLINE(开> 收 AND B,低,高,0,0),colorred;
STICKLINE(开> 收 AND B,收,开,5,0),colorred;
STICKLINE(开<=收 AND B,低,高,0,0),colorred;
STICKLINE(开<=收 AND B,收,开,5,1),colorred;
阴跌寻底:STICKLINE(开> 收 AND D,低,高,0,0),colorffff00;
STICKLINE(开> 收 AND D,收,开,5,0),colorffff00;
STICKLINE(开<=收 AND D,低,高,0,0),colorffff00;
STICKLINE(开<=收 AND D,收,开,5,0),colorffff00;
KS:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);
RKS:=REF(KS,1);
MLS:=RKS/KS>1.23 AND RKS>13 AND CLOSE/REF(CLOSE,1)>1.03;
非顶即底:STICKLINE(KS>13,高,低,0,1),colorwhite,linethick2;
绝地反击:STICKLINE(MLS=1,高,低,0,1),colorFF00FF,linethick2;
STICKLINE(KS>13,开,收,5,0),colorFF00FF,linethick2;
STICKLINE(MLS=1,开,收,5,0),colorFF00FF,linethick2;