Skip to documentation
Screebits Docs
Flow Editor
Open Screebits
  • Screebits
  • Flow Editor documentation
  • Blueprints
  • Your first steps in Screebits
  • Workspace, strategies and account
  • Get started with the Flow Editor
  • Build an RSI Momentum Alert
  • Flow Editor concepts
  • How a strategy starts and continues
  • Control and data connections
  • Nodes, parameters, outcomes, and ports
  • Plans and feature availability
  • Saves, versions, and checkpoints
  • Tactical and Portfolio strategies
  • Validation and readiness
  • Flow Editor mode guides
  • Build Portfolio strategies
  • Build Tactical strategies
  • Flow Editor guides
  • Add a Quant Hub metric
  • Configure a node
  • Configure Settings and visual preferences
  • Connect nodes
  • Create a strategy
  • Create checkpoints and restore versions
  • Reset a Flow safely
  • Debug and replay a Backtest
  • Fix validation issues
  • Use keyboard shortcuts
  • Manage variables
  • Run a Backtest
  • Save and resolve conflicts
  • Work on tablet and mobile
  • Use Quick add
  • Use the Inspector
  • Add, move, duplicate, and remove nodes
  • Flow Editor examples
  • Portfolio rebalance with risk limits
  • Tactical order and position monitoring
  • Use Backtest Center
  • Read a Backtest result
  • Compare and export Backtests
  • Explore Quant Hub
  • Metric parameters, charts and overlays
  • Flow Editor node reference
  • Set Variable
  • Flow Editor troubleshooting
  • Troubleshoot activation and validation
  • Troubleshoot Backtests and replay
  • Troubleshoot compact layouts
  • Troubleshoot connections and data types
  • Troubleshoot plans and locked features
  • Troubleshoot Quant Hub in the Flow Editor
  • Troubleshoot save, offline, and conflicts
  • Backtests and responsible use
  • Flow Editor glossary
  1. Screebits
  2. /Flow Editor documentation
  3. /Flow Editor node reference
  4. /Set Variable
IntermediateLast verified Sep 30, 2026

Set Variable

Updates a declared Flow variable from a control path.

On this page
  1. When to use
  2. Example
  3. Update state deliberately
  4. Common problems
  5. Next steps

Updates a declared Flow variable from a control path.

When to use

Use it when later paths need a named value that changes during execution.

Example

On a matched condition, store the current indicator value for a later comparison.

Try it here

Explore Set Variable

Updates a declared Flow variable from a control path.

Exercise steps
  1. Inspect the declared threshold variable in Variables.
  2. Change the literal value or operation on Set Variable; the lesson edits the graph without executing it.
Event TriggerSet Variable
Graph preview — a diagram of the example

Update state deliberately

Declare a numeric variable signalCount with initial value 0. On a matched control path, configure Set Variable with that name, Operation Increment, and a literal increment of 1. Its New Value is 1 after the first update; a later Read Variable in the same supported state context can observe 1. Set with literal 1 behaves differently on the second arrival: it remains 1, whereas Increment yields 2. Connect the control path through Next, and keep the selected variable type compatible with the value source. A variable write does not persist an arbitrary account setting outside its defined Flow state scope.

Common problems

Declare the variable first and match its type. This node changes a value only when its control path runs.

Next steps

Review the generated Parameters, Outcomes, and Data Ports on this page, then open the related guides for the complete workflow.

Node facts

These facts come from the current Flow Editor node catalog.

Node type
Set Variable
Activation role
No activation role
Category
Action
Availability
Tactical and Portfolio
Modes
Tactical and Portfolio
Required plan
None
Behavior
Performs an action
Control inputs
1
Output data types
any

Parameters

NameInput typeRequirementDefaultOptions and constraints
VariableTextRequiredNot setNone
OperationSelection listRequiredsetOptions: Set, Increment, Decrement, Toggle
Value sourceSelection listRequired when showndataPortOptions: Value port, Literal; Shown when Operation is not toggle
ValueExpressionRequired when shownNot setShown when Operation is not toggle and Value source is literal

Primary parameters

  • Variable
  • Operation
  • Value source
  • Value

Outcomes

  • Next

Data inputs

  • Valueany · Required when shownShown when Operation is not toggle and Value source is dataPort

Data outputs

  • New Valueany

Related documentation

  • Manage variablesDeclare, read, update, rename, and remove Flow variables while preserving their references.
  • Read VariableExposes the current value of a declared Flow variable as data.
  • How a strategy starts and continuesUnderstand primary activation, control outcomes, and why data alone does not execute an action.

On this page

1 / 5
  1. When to use
  2. Example
  3. Update state deliberately
  4. Common problems
  5. Next steps

Practical guidance for strategies, historical simulations and metric research in Screebits.

Responsible useGlossary