DIF:=CLOSE-IF(CLOSE LC,MIN(LOW,LC),MAX(HIGH,LC)); ACD:SUM(IF(CLOSE=LC,0,DIF),0); MAACD:eMA(ACD,M); a: MAACD + P*STD(MAACD,N); b:MAACD - P*STD(MAACD,N);