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
  • 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 guides
  4. /Manage variables
IntermediateLast verified Sep 30, 2026

Manage variables

Declare, read, update, rename, and remove Flow variables while preserving their references.

On this page
  1. Create a variable
  2. Read and update
  3. Rename or remove
  4. Example: count matching signals
  5. Initial value and lifetime

Variables store named values that nodes can read or update during a strategy execution. They are useful for stateful decisions, such as counting matches across evaluations in one run. They do not replace a market-data edge or create a new activation.

Create a variable

  1. Open Variables.
  2. Choose the create action.
  3. Enter a unique, descriptive name.
  4. Select the value type. New variables use the supported global/flow scope.
  5. Set the initial value when required.
  6. Add a short description. The current editor creates persistent global variables; reserved scope or persistence options cannot be selected.
  7. Save the declaration.

Use a type that matches the values you intend to connect or assign. The declaration is strategy-level configuration; choosing a name in a Read Variable or Set Variable node is a separate step. Before relying on the variable, confirm the node's selected declaration and resolved port type in the Inspector.

Try it here

Use a variable

Connect a declared variable to the nodes that read and update it.

Exercise steps
  1. Edit the initial value of threshold. Read Variable already refers to this editable declaration.
  2. Add Set Variable, choose threshold and inspect its value and typed ports. Use the variable panel to inspect usages or rename the declaration.
Event TriggerRead VariableExpression
Graph preview — a diagram of the example

Read and update

Add Read Variable to expose the declared value as data. It has no control input: connect its Value output to a compatible data consumer. Add Set Variable to update it from a control path; the write occurs when that path reaches the node. Select the intended declaration in each node. For Set Variable, choose the operation before choosing the value source: Set, Increment, and Decrement can use an active Value data port or supported literal; Toggle applies only to a boolean and does not need a value input.

Rename or remove

Review the usage list before changing a variable. Rename updates supported references through the editor. Delete only after understanding every affected node and recovery shown in the confirmation.

Variables cannot be changed while the graph is read-only or while a conflicting save state blocks editing.

Example: count matching signals

Declare signalCount with type number and initial value 0. Add Set Variable on the control branch after Condition.Match, select signalCount, choose Increment, set the source to Literal, and enter 1. Continue from Set Variable to Alert. A Read Variable node exposes signalCount as a number to a compatible data consumer. Reading does not increment it or start the flow.

EvaluationCondition outcomeCounter after the branch
First, RSI 58 with threshold 60No Match0
Second, RSI 62Match1
Third, RSI 63Match2

These values illustrate the path; an actual Backtest depends on its recorded data and evaluation schedule. If the counter stays at zero, check that Condition.Match reaches Set Variable, that the operation and selected declaration are correct, and that your test period contains a match. If validation reports a type issue, recheck the variable's declared type and whether the Value port or literal is active.

Use numeric variables for Increment/Decrement and a boolean for Toggle. Structured runtime values may require a data input instead of a typed literal. Changing the operation or value source can change the active Value port; review its data edge and validation. Set Variable also exposes New Value as data when another node needs the updated result.

Initial value and lifetime

The declaration and initial value are saved with the strategy. Each new Backtest initializes variables again; a later simulation does not continue the previous run’s counter. Global means shared within the strategy execution, not shared across your account or different strategies. Reserved activation-scoped or legacy declarations may be inspectable without being editable.

Related documentation

  • Read VariableExposes the current value of a declared Flow variable as data.
  • Set VariableUpdates a declared Flow variable from a control path.
  • Use the InspectorConfigure the current selection and understand its parameters, outcomes, data ports, and quick actions.

On this page

1 / 5
  1. Create a variable
  2. Read and update
  3. Rename or remove
  4. Example: count matching signals
  5. Initial value and lifetime

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

Responsible useGlossary