N:=10;M1:=11;M2:=9;UPPER:=(1+M1/100)*MA(CLOSE,N);LOWER:=(1-M2/100)*MA(CLOSE,N);ENE:=(UPPER+LOWER)/2;XG:C=ENE; (这样即可)