DIR:=Abs(CLOSE-REF(CLOSE,22));
VIR:=SUM(ABS(CLOSE-REF(CLOSE,1)),22);
ER:=DIR/VIR;
CS:=ER*(2/3-2/14)+2/14;
CQ:=CS*CS;
CG:EMA(DMA(CLOSE,CQ),2),COLORMAGENTA,LINETHICK3;
DIR:=Abs(CLOSE-REF(CLOSE,22));
VIR:=SUM(ABS(CLOSE-REF(CLOSE,1)),22);
ER:=DIR/VIR;
CS:=ER*(2/3-2/14)+2/14;
CQ:=CS*CS;
CG:EMA(DMA(CLOSE,CQ),2),COLORMAGENTA,LINETHICK3;