Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.1.0 (build 4024) - 05 June 2024

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

SMA - Simple Moving Average

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
packman2008
Posts: 88
Joined: Fri 30 Dec 2022 5:33 pm
Weather Station: Davis VP2 + WLL
Operating System: Windows 11
Location: Blackpool, UK
Contact:

SMA - Simple Moving Average

Post by packman2008 »

As I work my way through understanding how the Chart Compiler works there will probably be some questions like this. I hope this is a good place to ask them?

The Wiki describes the SMA option in STATS, but doesn't state what the default averaging period is. There's also a note that you can alter the period using a parameter, but I've not found any examples of different averaging periods being specified so the format isn't clear, e.g. how is the parameter added and what format is it in (hours, days, ?).
Chris

https://blackpool.weather-watch.com/
CMX build 4018 ● CU 7.0.0b1 ● Davis VP2+WLL & Ecowitt GW1100 ● Core i5 Mini PC ● Windows 11 ● .Net 8.0.3
User avatar
HansR
Posts: 6060
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: SMA - Simple Moving Average

Post by HansR »

This seems the right place yes :)

The period for the Simple Moving Average is currently determined by the parameter PeriodMovingAverage (see the page CDL - STATS.

There is one parameter over the whole CUtils which contains the nr of periods for the SMA. That may be not enough.
The default for the parameter is 180 periods. So that is days for the ALL and DAILY charts and for the RECENT and EXTRA charts that would be the number of samples which is determined by the log frequency of the data.

I am willing to think on how to fine tune / improve this.
Hope this clarifies.
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
packman2008
Posts: 88
Joined: Fri 30 Dec 2022 5:33 pm
Weather Station: Davis VP2 + WLL
Operating System: Windows 11
Location: Blackpool, UK
Contact:

Re: SMA - Simple Moving Average

Post by packman2008 »

Thanks Hans.

I assumed it was a parameter in CutilsCharts.def and I didn't think to look in the .ini file.

I don't know if multiple periods would be required though. I'm still learning the basics of all the knobs and switches in CDL before I try to embark on building any new charts.
Chris

https://blackpool.weather-watch.com/
CMX build 4018 ● CU 7.0.0b1 ● Davis VP2+WLL & Ecowitt GW1100 ● Core i5 Mini PC ● Windows 11 ● .Net 8.0.3
User avatar
HansR
Posts: 6060
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: SMA - Simple Moving Average

Post by HansR »

OK... for the time being that single parameter will do than I suppose.
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
HansR
Posts: 6060
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: SMA - Simple Moving Average

Post by HansR »

I decided to add a language construct to CDL as is already currently visible in the Wiki.

So, when you want an SMA line in a chart, you can optionally think of adding a period (when not given it will have a default about which I am thinking as it needs one for RECENT and one for ALL)

This will only be available in version 7 of CUtils which depends on CMX so uncertain release date atm.
Hans

https://meteo-wagenborgen.nl
CMX build 4023+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
packman2008
Posts: 88
Joined: Fri 30 Dec 2022 5:33 pm
Weather Station: Davis VP2 + WLL
Operating System: Windows 11
Location: Blackpool, UK
Contact:

Re: SMA - Simple Moving Average

Post by packman2008 »

Thanks Hans. I'll look forward to seeing the new CMX and CU when they appear.
Chris

https://blackpool.weather-watch.com/
CMX build 4018 ● CU 7.0.0b1 ● Davis VP2+WLL & Ecowitt GW1100 ● Core i5 Mini PC ● Windows 11 ● .Net 8.0.3
Post Reply