Strategies Overview
What Is a Trading Strategy?
A trading strategy is a set of rules that tell Botmarley when to buy and when to sell a cryptocurrency. Instead of watching charts all day and making emotional decisions, you define your rules once, and Botmarley follows them automatically -- 24 hours a day, 7 days a week.
Think of a strategy as a recipe:
- Ingredients are market data (prices, indicators, candle patterns).
- Instructions are the rules (if RSI drops below 30, buy).
- The result is consistent, disciplined trading without human emotion.
The Strategies List
The web interface provides a central place to manage all your strategies. From the list page you can edit, duplicate, delete, backtest, or start live trading for any strategy with a single click.

How Botmarley Strategies Work
Botmarley strategies are defined as TOML files -- simple, human-readable text files that describe a rule engine. Each strategy file lives in the strats/ directory and contains:
- Metadata -- the strategy's name, description, and position limits.
- Actions -- a list of things the bot can do (open a position, add to it, or sell).
- Triggers -- conditions that must be true for each action to fire.
Botmarley's strategy engine is exchange-agnostic. The same strategy TOML file works for any trading pair -- you select the pair when you start a backtest or live session, not in the strategy itself.
Strategy Evaluation Flow
Every time a new candle closes, Botmarley evaluates your strategy. Here is how the evaluation loop works:
flowchart TD
A["New Candle Received"] --> B["For Each Action in Strategy"]
B --> C{"Check ALL Triggers<br/>(AND logic)"}
C -- "All triggers TRUE" --> D["Execute Action<br/>(open_long / buy / sell)"]
C -- "Any trigger FALSE" --> E["Skip This Action"]
D --> F["Update Position State"]
E --> F
F --> G{"More Actions?"}
G -- "Yes" --> B
G -- "No" --> H["Wait for Next Candle"]
H --> A
style A fill:#4a9eff,color:#fff
style D fill:#22c55e,color:#fff
style E fill:#6b7280,color:#fff
style H fill:#4a9eff,color:#fff
Key points about evaluation:
- Each action is evaluated independently -- one strategy can have multiple buy and sell actions, and each is checked every tick.
- Triggers within an action are AND-combined -- ALL triggers must be true for the action to fire.
- Actions are evaluated in order -- from first to last as written in the TOML file.
Basic Strategy Anatomy
A Botmarley strategy TOML file has two main sections:
1. The [meta] Section
This defines your strategy's identity and global settings:
[meta]
name = "My First Strategy"
description = "A simple RSI-based entry and exit"
max_open_positions = 3
| Field | Required | Description |
|---|---|---|
name | Yes | Human-readable name for the strategy |
description | No | Optional explanation of the strategy's logic |
max_open_positions | No | Maximum concurrent open positions. Omit for unlimited. |
2. The [[actions]] Array
Each [[actions]] block defines one thing the bot can do, along with the conditions that must be met:
[[actions]]
type = "open_long" # What to do: open_long, buy, or sell
amount = "100 USDC" # How much: fixed amount or percentage
average_price = false # Whether to average the entry price (DCA)
[[actions.triggers]] # When to do it: one or more trigger conditions
indicator = "rsi_14"
operator = "<"
target = "30"
A Simple Complete Example
Here is a complete, working strategy that buys when RSI is oversold and sells when it recovers:
[meta]
name = "RSI_Scalper"
# ACTION 1: Open a position when RSI drops below 30
[[actions]]
type = "open_long"
amount = "100 USDC"
[[actions.triggers]]
indicator = "rsi_14"
operator = "<"
target = "30"
# ACTION 2: Sell half when RSI recovers to 50
[[actions]]
type = "sell"
amount = "50%"
[[actions.triggers]]
indicator = "rsi_14"
operator = ">"
target = "50"
# ACTION 3: Sell everything when RSI reaches 70
[[actions]]
type = "sell"
amount = "100%"
[[actions.triggers]]
indicator = "rsi_14"
operator = ">"
target = "70"
What this strategy does, step by step:
- Action 1 watches RSI(14). When it drops below 30 (oversold territory), the bot opens a new position by buying 100 USDC worth of the asset.
- Action 2 watches for RSI to rise above 50. When it does, the bot sells 50% of the position to lock in partial profit.
- Action 3 watches for RSI to rise above 70 (overbought territory). When it does, the bot sells the remaining 100% of the position to fully exit.
Start simple. A strategy with 2-3 actions is often more effective than a complex one with 10 actions. You can always add complexity after backtesting confirms the base logic works.
What's Next?
Now that you understand how strategies are structured, explore the following topics:
- Strategy Editor -- how to create and edit strategies in the web interface.
- Actions -- detailed explanation of
open_long,buy, andsell. - Indicators Reference -- every indicator Botmarley supports.
- Timeframes -- how multi-timeframe analysis works.
- Position Management -- DCA, position limits, and partial sells.
- Strategy Examples -- complete, battle-tested strategies you can use as starting points.