Exponentially smoothed moving average with 10% smoothing

Discuss the spreadsheet application
Locked
NumberCruncher
Posts: 17
Joined: Thu Oct 03, 2013 4:32 pm

Exponentially smoothed moving average with 10% smoothing

Post by NumberCruncher »

Guys I have used an OO template from here http://jonthysell.com/software/hackersdiet/
I cannot figure out how or where the "smoothed value" is calculated. Weight Tracker ODS v2.2.4 [89k ZIP]
https://launchpadlibrarian.net/91672538/wtods-2.2.4.zip

This is the background here:

To avoid the day to day variations in water retention etc Walker in HackersDiet uses a smoothing process

http://www.fourmilab.ch/hackdiet/www/su ... 0000000000

http://www.fourmilab.ch/hackdiet/www/su ... encilTrend

Basically the formula is:
TrendYesterday + (WeightToday - TrendYesterday)*.1

to estimate at your "smoothed" weight, he uses an "exponentially smoothed weighted avg with 10% smoothing".
http://www.fourmilab.ch/hackdiet/www/su ... 0000000000

< This is based on a post here
https://getsatisfaction.com/tapbots/top ... end_weight >
Last edited by MrProgrammer on Sun Oct 11, 2026 8:15 pm, edited 1 time in total.
Reason: Locked ancient, inactive topic
OpenOffice 4.0.0 on Windows 7
FJCC
Moderator
Posts: 9651
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Exponentially smoothed moving average with 10% smoothing

Post by FJCC »

I think the calculations you are looking for are on a hidden sheet. Select the menu Format -> Sheet -> Show and choose the Total sheet.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
NumberCruncher
Posts: 17
Joined: Thu Oct 03, 2013 4:32 pm

Re: Exponentially smoothed moving average with 10% smoothing

Post by NumberCruncher »

OK guys can anyone assist - this is the formula where c308 = the Smoothed 'Real' Weight (kg.) & c307 is the previous days data

=IF(OR(A308<startdate;A308>currentdate);"";IF(AND(A308>startdate;ISNUMBER(C307));C307+IF(E308=1;IF(rounding;ROUND(ROUND(B308-C307;1)*smooth;1);(B308-C307)*smooth);0);IF(istrend;trendstart+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstart;1)*smooth;1);(B308-trendstart)*smooth);0);IF(istrendlast;trendstartlast+IF(E308=1;IF(rounding;ROUND(ROUND(B308-trendstartlast;1)*smooth;1);(B308-trendstartlast)*smooth);0);B308))))
2yydug2.png
Smoothing is set to 10%

TREND
Returns values along a linear trend.
Syntax
TREND(DataY; DataX; NewDataX; LinearType)
DataY is the y-data array.
DataX (optional) is the x-data array.
NewDataX (optional) is the array of the x-data, which are used for recalculating values.
LinearType(Optional). If LinearType = 0, then lines will be calculated through the zero point. Otherwise, offset lines will also be calculated. The default is LinearType <> 0.
In the OpenOffice Calc functions, parameters marked as "optional" can be omitted only when no parameter follows. For example, in a function with four parameters, in which the last two parameters are marked as "optional", you can omit parameter 4 or parameters 3 and 4, but you cannot omit parameter 3 alone.
More explanations at the top of this page.
Example
Select a spreadsheet range in which the trend data will appear. Select the function. Enter the output data or select it with the mouse. Mark the Array field. click OK. The trend data calculated from the output data is displayed.
OpenOffice 4.0.0 on Windows 7
FJCC
Moderator
Posts: 9651
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Exponentially smoothed moving average with 10% smoothing

Post by FJCC »

I'm not sure what your question is. The TREND function doesn't enter into the formula. There are named cells "istrend", "istrendlast", "trendstart" and "trendstartlast" which are B384, C384, B383 and C383 on the Total sheet. The meaning of such names can be seen by selecting Insert -> Names -> Define.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Locked