Declare Variable is used when a strategy needs to capture or calculate a value at one point in the workflow and reuse that same result later. It calculates once and keeps its data source values and calculated outputs fixed for the rest of that workflow run.
Use it for a saved snapshot rather than a continuously refreshed condition.
Use Declare Variable when you need to:
Yes.
Declare Variable can:
You should not choose Declare Variable simply because the strategy uses mathematics. Expression Builder also supports calculations.
The deciding factor is whether the result should remain fixed or live.
“Alert when the live price is at least 10% above the price when the automation started.”
The workflow needs two different types of values:
| Scenario | What to do |
|---|---|
| What if the value should refresh each time the condition is checked? | Use Expression Builder. |
| What if I select the highest-OI option at 9:20 AM and want to keep monitoring that same contract? | Use Declare Variable to save the selected symbol, then use that symbol in later live checks. |
| What if another option later becomes the highest-OI contract? | The saved symbol does not change during that workflow run because the Declare Variable result is already frozen. |
| What if the automation runs again? | Declare Variable calculates again when the node executes in the new workflow run. |
Last updated: 26 Aug 2026