list={a,b,c,d,e};
listVah={1,2,1};
NormListVah=(listVah/(Plus@@listVah));
MovingAverage[list,listVah]

NormListVah.#&/@Partition[list,3,1]

(1/(Plus@@listVah))Table[listVah.Take[list,{i,i+Length[listVah]-1}],{i,1,Length[list]-Length[listVah]+1}]

rozdil[n_]:=Timing[Total[Range[n]]]-AbsoluteTiming[Total[Range[n]]];
rozdil[600000]

(*filtry nAV menit (2^n)*)

(1/(Plus@@listVah))*(listVah.Take[list,{#,#+Length[listVah]-1}]&/@Range[Length[list]-Length[listVah]+1])

SeedRandom[10];
Sin[2x]-2Sin[x]*Cos[x]/.x->Random[]

SeedRandom[10];
Table[Random[],{10}]

SeedRandom[2];
f=50+Random[];
ampl=10+Random[];
faze=0.2+Random[];
vstupPresne[t_]:=ampl*Sin[2*Pi*f*t+faze];
sumMax=1.5;
sum:=Random[Real,{-sumMax,sumMax}];
tmax=0.06;
n=200;
data={#,vstupPresne[#]+sum}&/@Range[0,tmax,(tmax/(n-1))];
pl1=ListPlot[data,AxesLabel->{"t","val"}];

Max[Abs[data[[All,2]]]];
amplStart=Abs[data/.{a_,b_}:>b]//Max;

dvojice=Partition[data,2,1];
test[{{_,a_},{_,b_}}]:=a*b<0;
bodyZmen=Select[dvojice,test];
(*bodyZmen=Select[dvojice,#[[1,2]]*#[[2,2]]<0&];*)

pruchodNulou[bod:{{t1_,u1_},{t2_,u2_}}]:=Module[{fit,t},fit=Fit[bod,{1,t},t];t/.Solve[fit==0][[1]]];
pruchodNulou[bodyZmen[[1]]];
pruchody=pruchodNulou/@bodyZmen;
dtOdhad=Mean[Partition[pruchody,2,1]/.{a_,b_}:>b-a];
fOdhad=(1/(2*dtOdhad));

model=a*Sin[2*Pi*fv*t+φ];
resFit=FindFit[data,model,{{a,amplStart},{fv,fOdhad},φ},t,MaxIterations->(10^4)];
vysledek=model/.resFit;

pl2=Plot[vysledek,{t,0,tmax},PlotStyle->Black];
Show[pl1,pl2]