VARX:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
VARY:=(HIGH-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
VARZ:=(LOW-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
VARXS:=SMA(VARX,M1,1);
VARYS:=SMA(VARY,M1,1);
VARZS:=SMA(VARZ,M1,1);
VARXSS:=SMA(VARXS,M2,1);
VARYSS:=SMA(VARYS,M2,1);
VARZSS:=SMA(VARZS,M2,1);
VAR1:4*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,M1,1)-
3*SMA(SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,M1,1),M2,1),coloryellow,LINETHICK1;
最大:4*((VARY+(M1-1)*REF(VARYS,1))/M1)-3*((((VARY+(M1-1)*REF(VARYS,1))/M1)+(M2-1)*REF(VARYSS,1))/M2),colorlired,LINETHICK1;
最小:4*((VARZ+(M1-1)*REF(VARXS,1))/M1)-3*((((VARZ+(M1-1)*REF(VARXS,1))/M1)+(M2-1)*REF(VARXSS,1))/M2),colorligreen,LINETHICK1;
VAR2:8,colorgreen,LINETHICK0;
准备拉升: IF(CROSS(最小,VAR2),80,0),STICK,colorwhite,LINETHICK2;
压住庄家: IF(VAR1<=8,0,0),STICK,colorwhite,LINETHICK1;
DRAWTEXT(CROSS(VAR1,VAR2),5,'建仓'),colorcyan;
VARO5:=LLV(LOW,27);
VARO6:=HHV(HIGH,34);
VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;
DIFS:=EMA(CLOSE,N*2);
DIFL:=EMA(CLOSE,N*4);
DIF:=DIFS-DIFL,colorwhite;
DEA:=EMA(DIF,M3),coloryellow;
MACD:=(DIF-DEA)*2,COLORSTICK;
IF DIF>=REF(DIF,1) AND DEA>=REF(DEA,1) AND DIF>=DEA THEN 建仓区:100 ,coloryellow,LINETHICK1;
IF DIF<=REF(DIF,1) AND DEA>=REF(DEA,1) AND DIF>=DEA THEN 建仓区:85 ,coloryellow,LINETHICK1;
IF DIF<=REF(DIF,1) AND DEA>=REF(DEA,1) AND DIF<=DEA THEN 建仓区:80 ,coloryellow,LINETHICK1;
IF DIF>=REF(DIF,1) AND DEA>=REF(DEA,1) AND DIF<=DEA THEN 建仓区:85 ,coloryellow,LINETHICK1;
IF DIF<=REF(DIF,1) AND DEA<=REF(DEA,1) AND DIF>=DEA THEN 建仓区:70 ,coloryellow,LINETHICK1;
IF DIF>=REF(DIF,1) AND DEA<=REF(DEA,1) AND DIF>=DEA THEN 建仓区:80 ,coloryellow,LINETHICK1;
IF DIF<=REF(DIF,1) AND DEA<=REF(DEA,1) AND DIF<=DEA THEN 建仓区:60 ,coloryellow,LINETHICK1;
IF DIF>=REF(DIF,1) AND DEA<=REF(DEA,1) AND DIF<=DEA THEN 建仓区:85 ,coloryellow,LINETHICK1;
DRAWTEXT(最小<15 AND 最小>=-5 AND (CLOSE-REF(CLOSE,1))/CLOSE<=(var1-REF(var1,1))/var1 AND MA(CLOSE,N*2)>=REF(MA(CLOSE,N*2),1),最小,'备');
DRAWTEXT(REF(最大,1)>=建仓区 AND 最大<=REF(最大,1),最大+10,'卖');
VERLINE(CROSS(DAY<>REF(DAY,1),0.5),2),colorcccccc;
VERLINE(CROSS(MONTH<>REF(MONTH,1),0.5),2),colorcccccc