Strategy Editor
The Strategy Editor is where you create, edit, and manage your trading strategies. Access it from the sidebar by clicking Strategies or navigating directly to /strats.
The Strategies List Page
The strategies list page (/strats) shows all your saved strategies. For each strategy you can see:
- The strategy name and description
- When it was created and last updated
- Action buttons for editing, duplicating, backtesting, and deleting
flowchart LR
A["Strategies List<br/>/strats"] --> B["Edit<br/>/strats/edit/{id}"]
A --> C["New Strategy<br/>/strats/new"]
A --> D["Duplicate"]
A --> E["Delete"]
A --> F["Backtest"]
B --> G["Save"]
C --> G
G --> A
style A fill:#4a9eff,color:#fff
style G fill:#22c55e,color:#fff
Creating a New Strategy
To create a new strategy:
- Navigate to
/strats(click Strategies in the sidebar). - Click the New Strategy button.
- The editor opens with an empty TOML document.
- Write your strategy in TOML format (see Strategy Overview for the structure).
- Click Save.
The editor assigns a unique ID (UUID) to your new strategy automatically.
If you are new to writing strategies, start by duplicating one of the existing strategies and modifying it. This is faster than writing from scratch and helps you learn the TOML structure by example.
The Visual Strategy Editor
The visual editor provides a form-based interface for building strategies without writing TOML by hand. You can add actions, configure triggers, set indicator parameters, and define position management rules -- all through a structured UI.

The TOML Text Editor
The strategy editor at /strats/edit/{id} provides a text-based TOML editor where you write your strategy directly. The editor shows the raw TOML content of your strategy file.

A typical editing session looks like this:
- The
[meta]section is at the top -- set your strategy's name and description here. - Below that, define your
[[actions]]blocks with their triggers. - As you type, the editor validates your TOML in real time.
Editor Layout
The editor page provides:
- Strategy name displayed at the top
- TOML text area for editing the strategy content
- Save button to persist changes
- Back to list link to return to
/strats
Real-Time Validation
Every time you save or validate your strategy, Botmarley checks the TOML content for errors. The validation endpoint (POST /api/strats/validate) checks:
- TOML syntax -- is the file valid TOML?
- Required fields -- does
[meta]have aname? Does each action have atypeandamount? - Valid action types -- only
open_long,buy, andsellare accepted. - Amount format -- must be
"100 USDC"(fixed) or"50%"(percentage). - Indicator format -- must match known patterns like
rsi_14,sma_50,bb_lower. - Operator validity -- must be one of
>,<,=,cross_above,cross_below. - Timeframe validity -- if specified, must be
1m,5m,15m,1h,4h, or1d. - Period ranges -- indicator periods must be between 1 and 200.
max_open_positions-- if set, must be 1 or greater.
When validation fails, the error response includes:
| Field | Description |
|---|---|
field_path | Where the error is, e.g. actions[0].triggers[1].operator |
error_code | Machine-readable code like INVALID_FORMAT or REQUIRED |
message | Human-readable description of the problem |
suggestion | Hint for how to fix the error |
Botmarley will not let you save an invalid strategy. Fix all validation errors before saving. This prevents broken strategies from being used in backtests or live trading.
Common Validation Errors
| Error | Cause | Fix |
|---|---|---|
INVALID_ACTION_TYPE | Typo in action type | Use open_long, buy, or sell |
INVALID_AMOUNT_FORMAT | Missing unit or wrong format | Use "100 USDC" or "50%" |
INVALID_PERIOD | Non-numeric indicator period | Use rsi_14 not rsi_fourteen |
INVALID_PERIOD_RANGE | Period 0 or > 200 | Keep periods between 1 and 200 |
REQUIRED | Missing indicator or operator | Add the missing field to your trigger |
INVALID_TIMEFRAME | Unknown timeframe string | Use 1m, 5m, 15m, 1h, 4h, or 1d |
INVALID_OPERATOR | Unknown comparison operator | Use >, <, =, cross_above, cross_below |
Saving Strategies
When you click Save, Botmarley:
- Validates the TOML content server-side.
- If valid, writes the TOML file to the
strats/directory with the strategy's UUID as the filename. - Returns a success response with the strategy ID.
- Logs the save action to the activity log.
If the strategy is new (no ID yet), a new UUID is generated. If you are editing an existing strategy, the same ID is reused and the file is overwritten.
Strategy files are stored as plain .toml files in the strats/ directory. The filename is the UUID (e.g., 6f814a05-73e8-483f-8963-aa8a4ab8e1e7.toml). You can also edit these files directly with any text editor -- Botmarley reads them from disk.
Duplicating Strategies
To duplicate a strategy:
- Go to the strategies list (
/strats). - Click the Duplicate button on the strategy you want to copy.
- Botmarley creates a copy with " (Copy)" appended to the name.
- You are redirected to the editor for the new copy.
This is useful when you want to create variations of an existing strategy (for example, testing different RSI thresholds or DCA levels).
Deleting Strategies
To delete a strategy:
- Go to the strategies list (
/strats). - Click the Delete button on the strategy you want to remove.
- The TOML file is removed from the
strats/directory. - You are redirected back to the list.
Deleting a strategy is permanent. The TOML file is removed from disk. If you think you might want the strategy later, duplicate it first or keep a backup.
Bulk Delete
You can also select multiple strategies and delete them all at once using the bulk delete feature on the strategies list page. Select the checkboxes next to the strategies you want to remove, then click the bulk delete button.
Discovering Available Pairs
When you open the backtest modal from the strategies list page, Botmarley automatically scans your downloaded market data to show you which trading pairs are available. This is based on the .arrow files in your data storage directory.
The available pairs and their date ranges are shown in the backtest form, so you can select:
- Which pair to backtest against (e.g.,
XBTUSD,ETHUSD) - Start and end dates -- pre-filled based on your actual data range