Skip to content

Compose a strategy

Goal: combine existing strategies into a composite strategy (cfg.strategy.<NAME>, {components}), or add an atomic one from the registry.

Prerequisites

  • Signed in as an admin.
  • The target context is active; on a protected context each write asks first.
  • At least two known strategies: atomic ones are workers tagged type (the registry's New strategy worker… creates one), composite ones are already composed.

Steps

  1. Open Trading > Strategy (route /trading/strategy). The table lists every strategy: Name, Kind (atomic or composite), Detail, Status.
  2. Optional: a new atomic strategy. New strategy worker… opens New worker from the registry (see Start a worker); the worker is tagged type=<its name>. Start it from Infra > Workers.
  3. Compose… The dialog Compose a strategy opens.
  4. Name: upper-case, e.g. MOMENTUM_MIX.
  5. Components: tick at least two, in the order you want them (N chosen, in the order picked).
  6. Compose. The composite is saved as cfg.strategy.<NAME>.

To remove one: select it, Remove…. A composite loses only its entry (its components stay); an atomic one's worker is deleted. The dialog warns when other composites use it (Used by …: they will name a strategy that is gone.).

What you should see

  • A new row, Kind composite, Detail listing its components.
  • Infra > Changes: Compose strategy <NAME>.
  • The scenario's strategy leg may name it (Trading > Scenario, Add… → Strategy id).

Troubleshooting

Symptom Cause and fix
Compose… disabled Fewer than two known strategies, or you are not an admin.
Name: an upper-case identifier (letters, digits, _; at most 32) Use e.g. MOMENTUM_MIX. Composing under an existing composite's name replaces its components.
Pick at least 2 components Tick two or more.
Composing <NAME> from … would make a cycle A composite cannot contain itself, directly or through another composite.
An atomic strategy is missing Its worker has no type tag: tag it on Infra > Workers (Tag…, key type).

More: Views > Strategy.