MA1:=MA(CLOSE,5);
MA2:=MA(CLOSE,10);
MA3:=MA(CLOSE,20);
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2;
LC:=REF(CLOSE,1);
AA:=ABS(HIGH-LC);
BB:=ABS(LOW-LC);
CC:=ABS(HIGH-REF(LOW,1));
DD:=ABS(LC-REF(OPEN,1));
R:=IF(AA>BB AND AA> CC,AA+BB/2+DD/4,IF(BB> CC AND BB> AA,BB+AA/2+DD/4,CC+DD/4));
X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
SI:=8*X/R*MAX(AA,BB);
ASI:=SUM(SI,0);
MASI:=MA(ASI,6);
LCT:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LCT,0),N1,1)/SMA(ABS(CLOSE-LCT),N1,1)*100;
RSI2:=SMA(MAX(CLOSE-LCT,0),N2,1)/SMA(ABS(CLOSE-LCT),N2,1)*100;
RSI3:=SMA(MAX(CLOSE-LCT,0),N3,1)/SMA(ABS(CLOSE-LCT),N3,1)*100;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
SWL:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
SWS:=DMA(EMA(CLOSE,12),MAX(1,100*(SUM(VOL,5)/(3*CAPITAL))));
MA1< MA2 AND DEA>0
AND CROSS(ASI,MASI) AND CROSS(RSI1,RSI3)
AND CROSS(RSI2,RSI3) AND CROSS(J,D) AND CROSS(K,D)
AND CROSS(SWL,SWS) AND MA1> MA3;