S:=IF(PERIOD=0,1,IF(PERIOD=1,5,DRAWNULL));
A1:=BARSLAST(DAY!=REF(DAY,1))+1;
均:IF(S,IF(C>0,SUM(AMOUNT,A1)/SUM(V,A1)/100,DRAWNULL),DRAWNULL)COLORLIBLUE,CIRCLEDOT;
卖:均+(2*SQRT(MA((C-均)*(C-均),A1)))DOTLINE,COLORLIBLUE;
买:均-(2*SQRT(MA((C-均)*(C-均),A1)))DOTLINE,COLORLIBLUE;