Skip to main content

Quick Start: Build Your First Strategy

This walkthrough takes you from a blank workspace to a running strategy in about 5 minutes. You'll use SMITH, FORJ's visual strategy editor, to build a minimal strategy that alternates between two states on every new candle.

Prerequisites

Step 1 — Open SMITH

  1. Click New Strategy in the sidebar.
  2. Enter a name for your strategy (e.g., BTCUSD_Starter) and confirm.

SMITH opens with an empty canvas and a Creation Checklist showing the requirements before you can save.

Step 2 — Configure Context

  1. Click the Gear icon at the bottom of the canvas to open the Strategy Toolbar.
  2. Select Configure Context.
  3. Set the Symbol (the instrument your strategy will track, e.g., BTCUSD).
  4. Set the Candle Length (the timeframe for market updates, e.g., 5m for 5-minute candles).
  5. Save the context.

The checklist item "Context Configured" is now satisfied.

Step 3 — Add Two States

  1. From the Strategy Toolbar, select Add New State.
  2. Name it Watching and save.
  3. Add a second state named Active.

The checklist item "At Least Two States Configured" is now satisfied.

Step 4 — Set the Initial State

  1. On the Watching state widget, click Set as Initial State.

The checklist item "Initial State Configured" is now satisfied. This is the state your strategy starts in when enabled.

Step 5 — Add Transitions

  1. On the Watching state widget, click Add Transition.
  2. Set the trigger to a New Candle event and the target state to Active. Save.
  3. On the Active state widget, add a transition back to Watching on a New Candle event.

The checklist item "All States Have Transitions" is now satisfied.

Step 6 — Save Your Strategy

With all checklist items satisfied, the Create Strategy button is now enabled.

  1. Click Create Strategy.
  2. SMITH closes and returns you to the Strategy Dashboard.

Your new strategy appears as a tile on the dashboard.

Step 7 — Subscribe to a Data Stream

Your strategy needs a live data feed before it can receive events. If you haven't already connected a data source to your workspace, do that first (see Data Sources).

  1. Reopen the strategy in SMITH (click the tile on the dashboard).
  2. Open the Strategy Toolbar (gear icon) and select Data Subscriptions.
  3. Choose the stream that matches your configured symbol and candle length, then confirm.

Your strategy is now wired to incoming market data.

info

Without a data subscription the strategy will save and enable successfully but will never receive events. This is the most commonly missed step.

Step 8 — Enable Your Strategy

  1. Return to the Strategy Dashboard.
  2. Find your strategy tile and click the Power toggle to enable it.

Your strategy is now live — it will receive market events at the candle length you configured and alternate between its two states.

tip

You can disable your strategy at any time by toggling the power switch off. When disabled, the strategy resets to its initial state and default context values.

What's Next

This minimal strategy shows the basic building blocks. To make it useful, you'll want to:

  • Add conditions — define the rules that control when transitions fire
  • Configure actions — specify what happens during a transition (trade signals, alerts, variable updates)
  • Connect a data source — set up live market data feeds for your workspace
  • Run a backtest — use CRUCIBLE to test your strategy against historical data before going live