Html Javascripts Average Method In Forecasting