anchor.diff:       ?_assertEqual([6/3], moving_average([1,4,1], 4)),
        ?_assertEqual([1/1,4/1,1/1], moving_average([1,4,1], 1)),
        ?_assertEqual([5/2,9/3,10/3,9/3,6/3,4/3,2/2], moving_average([null,2,3,4,3,2,1,1,null], 3)),
  -     ?_assertEqual([6/3,9/3,10/3,9/3,6/3,4/3,3/3], moving_average(pseudo_values([1,2,3,4,3,2,1,1,1]), 3))
  +     ?_assertEqual([{120,6/3},{130,9/3},{140,10/3},{150,9/3},{160,6/3},{170,4/3},{180,3/3}],
  +                   moving_average(pseudo_values([1,2,3,4,3,2,1,1,1]), 3))
       ].
   
   percentile_test_() ->
  
positive.code:            (A, B) -> <<A/binary, ".", B/binary>>
          end,
      lists:foldr(F, <<>>, Parts).
  
  
  with_timestamps(Values, Start, Step) ->
      with_timestamps(Values, Start, Step, []).
  
  with_timestamps([], Start, Step, Acc) ->
      lists:reverse(Acc);
  with_timestamps([V | Vs], Start, Step, []) ->
      with_timestamps(Vs, Start, Step, [{Start, V}]);
  with_timestamps([V | Vs], Start, Step, [{TS, _} | _] = Acc) ->
      with_timestamps(Vs, Start, Step, [{TS + Step, V} | Acc]).
  
  
  safe_average(Values) ->
  
negative.code:                       % fetch additional past data
                        [S] = fetch_data([S0#series.target], From-(WindowPoints * Step), Until, Now),
                        Values = moving_average(S#series.values, WindowPoints),
                        S0#series{values=Values}
                end, Series);
  
  % multiplySeries
  