VAR1:=REF(CLOSE,1);
VAR2:=SMA(MAX(CLOSE-VAR1,0),6,1)/SMA(ABS(CLOSE-VAR1),6,1)*100;
VAR3:=SMA(MAX(CLOSE-VAR1,0),12,1)/SMA(ABS(CLOSE-VAR1),12,1)*100;
VAR4:=(BARSLAST(VAR3<20)<=3 AND CROSS(VAR2,VAR3));
VAR5:=((CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100<-12.5);
VAR6:=LLV(LOW,5);
VAR7:=HHV(HIGH,5);
VAR8:=EMA((CLOSE-VAR6)/(VAR7-VAR6)*100,4);
VAR9:=EMA(0.667*REF(VAR8,1)+0.333*VAR8,2);
买入翻倍:(VAR4 AND VAR5 AND CROSS(VAR8,VAR9) AND VAR8<=25);