DocsUtilitySerializer

Serializer

TransformUtility

The Serializer node broadcasts a single constant numeric value over the entire bar timeline of a connected source. It creates an array where every element equals the configured value — useful for horizontal reference lines, thresholds, and constant inputs to math nodes.

Formula

values[i]=value   for all i ∈ [0, len)

The length and timestamps come entirely from the connected input node. No computation is performed on the input values — only its timeline is used.

Parameters

NameTypeDefaultDescription
valuenumber0The constant to broadcast. Any finite number — positive, negative, or fractional.

Inputs & Outputs

PortTypeDescription
Input
inputany nodeProvides the bar timeline (timestamps). The input's values are not used.
Outputs
valuesnumber[]Constant-filled array of length = input bar count. Every element equals the configured value.
timestampsnumber[]Bar timestamps copied from the input node.

Use Cases

Horizontal reference line on the chart

Set value = 70 and connect to a chart area node to draw a flat overbought line alongside an RSI indicator. Change the value in the property panel to reposition the line without touching any other node.

Threshold for Compare logic

Feed a Serializer (value = 50) and an RSI into a Compare node to generate a boolean signal whenever RSI crosses above 50. Adjusting the threshold only requires changing the Serializer value.

Fixed position size constant

Use Serializer as the position-size constant when you want a flat number-of-shares approach rather than percentage-based sizing. Pipe it directly into a Position Sizing or Risk Per Trade node.