N:=12;
AA:=(CLOSE+LOW+HIGH)/3;
BB:=SUM(((AA-REF(LOW,1))-(HIGH-AA))*vol/100000/(HIGH-LOW),0);
CC:=Ema(BB,1);
DD :=REF(CLOSE,1);
VAR1:=SMA(MAX(CLOSE-DD,0),12,1)/SMA(Abs(CLOSE-DD),12,1)*100;
VAR2:=SMA(MAX(CLOSE-DD,0),18,1)/SMA(ABS(CLOSE-DD),18,1)*100;
VAR3:=MA(3*VAR1-2*SMA(MAX(CLOSE-DD,0),16,1)/SMA(ABS(CLOSE-DD),16,1)*100,3);
VAR4:=EMA(VAR3,8);
上指:crOSS(VAR3,VAR4);