Moving Average

logic · C322 · starter-package 7.0.1

Purpose

Calculate trailing averages over a whole-number window.

Connectors and setting

  • Values: non-empty list of up to 4096 finite numbers.
  • Window: whole number from 1 through the list length.
  • Partial windows: Include emits leading shorter windows; Exclude starts after a complete window exists.
  • Averages: resulting numeric list.

Example

Values [2, 4, 8], window 2, and Include return [2, 3, 6].

Exact settings reference

These are the saved settings and defaults. If a value is connected to the matching input, that connected value is used.

IDSettingControlDefaultBounds/options
partialPartial windowstoggleincludeoptions: Include (include), Exclude (exclude)

Failure cases

Invalid lists, non-whole or out-of-range windows, unknown settings, and non-finite averages stop execution.

Errors and recovery

When this block reports an error, no downstream output is emitted. Correct the highlighted input or setting described by the message, then run the workflow again.

Connector data types

The type below is the data type that actually travels through the connection. Any additional validation is described separately in this block guide.

DirectionConnectorTypeRequired
Inputvalues — Valueslistyes
Inputperiod — Windownumberyes
Outputresult — Averagesliston success