N:=6;K:=12;P:=24;
BG:=BARSCOUNT(C)+2;
NB:=IF(BG<N,BG,N);
KB:=IF(BG<K,BG,K);
PB:=IF(BG<P,BG,P);
MN:=SUM(C,NB)/SUM(1,NB);
MN2:=SUM(C*C,NB)/SUM(1,NB);
MK:=SUM(C,KB)/SUM(1,KB);
MK2:=SUM(C*C,KB)/SUM(1,KB);
MP:=SUM(C,PB)/SUM(1,PB);
MP2:=SUM(C*C,PB)/SUM(1,PB);
MA_S:=POW(MN*MK*MP,1/3);
{- }
XZN:=NB/(NB-1);
XZK:=KB/(KB-1);
XZP:=PB/(PB-1);
SD1:=(MN2-MN*MN)*XZN;
SD2:=(MK2-MK*MK)*XZK;
SD3:=(MP2-MP*MP)*XZP;
SD:=SQRT((SD1+SD2+SD3)/3);
顶线:MA_S+2*SD;
强线:MA_S+SD;
中线:MA_S;
弱线:MA_S-SD;
底线:MA_S-2*SD;