N:=27;
VAR3:=(C-LLV(L,125))/(HHV(H,125)-LLV(L,125))*100;
VAR4:=SMA(VAR3,72,1);
VAR5:=SMA(VAR4,34,1);
中线趋势:=3*VAR4-2*VAR5;
中线趋势升:=(中线趋势-REF(中线趋势,1))>=0;
均五升:=(MA(C,5)-REF(MA(C,5),1))>=0;
均十升:=(MA(C,10)-REF(MA(C,10),1))>=0;
VAR6:=(2*C+H+L)/4;
VAR7:=LLV(L,N);
VAR8:=HHV(H,N);
攀登:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,13)-50;
金山:=EMA(0.618*REF(攀登,1)+0.382*攀登,3);
运动员:=IF(攀登>=金山 AND 均五升 AND 均十升 AND 中线趋势升 AND 金山<0,1,0);
起攀:=IF(运动员=1 AND COUNT(运动员=1,5)=1,8,0);
bias1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离:=MA(BIAS,3);
必抄底:=IF(起攀=8 AND COUNT(乖离<-12,10)>=1,10,0);
必抄底XG:必抄底=10;