Skip to main content

Strategy Configuration

Before building states and transitions, configure the pieces your strategy depends on — data subscriptions, variables, indicators, and trade plans. All configuration is accessed through the Strategy Toolbar (gear icon in the header).

Opening the Strategy Toolbar

Click the Gear icon in the header to open the Strategy Toolbar. It's organized into six sections — see SMITH Overview for the full layout.

You can revisit the toolbar at any time to adjust settings.

Data Subscriptions

Your strategy needs at least one data stream to receive events. Open the Data section of the toolbar to subscribe to streams in your workspace.

  • Browse available streams and select the ones this strategy should listen to.
  • If subscribing to multiple streams, drag them into priority order — lower numbers process first when events arrive at the same timestamp.
  • See Subscribing Strategies to Streams for details on stream kinds, priority, and cross-stream conditions.

Custom Variables

Open Manage Custom Variables in the Assets section of the toolbar. Custom variables let you store values that persist across state transitions — they act as your strategy's memory.

When to Use Custom Variables

Use a custom variable whenever your strategy needs to remember something between events or across states:

  • Counting occurrences — track how many consecutive candles met a condition before entering a position.
  • Storing a price level — capture the close price at entry so you can compare against it later.
  • Accumulating values — sum profit/loss across multiple trades within a session.
  • Flagging state — set a boolean to indicate that a particular event has occurred (e.g., "breakout confirmed").

How Custom Variables Work

  1. Define them by giving each variable a name and an initial value (number, string, or boolean).
  2. Update them in Actions — for example, an action on a transition can set tradeCount to tradeCount + 1 or store the current close price into entryPrice.
  3. Read them in Conditions — for example, a condition can check whether tradeCount < 3 or whether close > entryPrice.

Variable values carry forward automatically as the strategy moves between states. They reset to their initial values only when the strategy is disabled and re-enabled.

Example: Tracking Consecutive Bullish Candles

VariableInitial ValuePurpose
bullishCount0Number of consecutive bullish candles observed
  • Action on Watching → Watching transition: if the candle is bullish, set bullishCount = bullishCount + 1; otherwise reset to 0.
  • Condition on Watching → Ready transition: bullishCount >= 3 — only transition after three bullish candles in a row.

Indicators

Indicators are configured at the workspace level and assigned to data streams. Once assigned, their values are available as operand sources in conditions. You don't need to subscribe a strategy to indicators explicitly — if your strategy is subscribed to a data stream that has indicators assigned, those indicator values are available in conditions automatically.

See Indicators for creating indicator configs, assigning them to streams, and understanding each indicator type.

Trade Plans

Open Manage Trade Plans in the Trade & Alerts section. A trade plan packages the parameters for the Execute Trade action — instrument type, direction, stop loss, take profit, and position sizing.

See Trade Plans for full details.