Managing Actions
Actions define what your strategy does when a transition fires — update a variable, execute a trade, or run conditional logic. Each action is a sequence of one or more steps that execute in order.
Opening the Actions Manager
- In SMITH, click the gear icon to open the Strategy Toolbar.
- Select Manage Actions.
The Actions Manager panel lists all actions in your strategy, with step summaries and usage counts.
Creating an Action
- Click New Action (or Create Action if none exist yet).
- Name the action (e.g.,
Enter_Long,Increment_Counter,Log_Exit). - Add one or more steps to define what the action does.
Action Step Types
Each step in an action is one of these types:
Operation
A direct operation on your strategy's context. Sub-types:
| Operation | What It Does |
|---|---|
| Assign | Set a variable to a specific value |
| Increment | Add a value to a numeric variable |
| Decrement | Subtract a value from a numeric variable |
| Swap | Exchange the values of two variables |
| Custom | A custom operation expression |
Values can come from three sources:
- Static — a fixed number, string, or boolean
- Context — a value from one of your strategy's variables
- Event — a value from the incoming market event payload
Predefined
Built-in actions with specialized behavior:
| Action | What It Does |
|---|---|
| Execute Trade | Records a trade execution with direction, entry price, stop-loss, and take-profit levels. |
Execute Trade works like any other action step — it runs when the transition fires (or when a conditional branch triggers it). Trade parameters (instrument, direction, SL/TP, position size) are defined through Trade Plans — reusable blueprints that you configure separately from the action step itself. See Trade Plans for full details on creating plans, configuring SL/TP modes, exit strategies, and alert integration.
Conditional
An if/then/else branching step. You define a set of conditions (using the same All (AND) and Any (OR) groups as guards), and then specify:
- True branch — steps that execute when the conditions pass.
- False branch — steps that execute when the conditions fail.
Both branches can contain any step type, including nested conditional steps for complex decision trees.
Example: "If tradeCount < 3, increment tradeCount and execute a trade; otherwise, do nothing."
Conditional action steps give you guard-like logic inside an action, so you can branch behavior without creating separate transitions. See Conditions — Conditions in Conditional Actions for details on how conditions work in this context.
Do Nothing
A no-op step — nothing happens, context is unchanged. Useful as a placeholder or for clarity in conditional branches.
Editing and Deleting Actions
- Edit: Click an action to expand it, then click Edit to modify its steps
- Delete: Click Delete to remove an action. If it's referenced by transitions, SMITH shows which transitions will be affected
Usage Counts
Each action shows a usage count — the number of transitions that reference it. This helps identify unused actions and understand the impact of edits.