Strategy builder
Define entry/exit rules, risk and position sizing without code.
A strategy is a tree of nested rule blocks. The editor validates the strategy on every change; an invalid block is highlighted in red and must be fixed before saving.
What a strategy contains
- Timeframe (base): the bars the rules are evaluated on. Indicators can also be read from a higher timeframe (e.g. a 4h EMA in a 1h strategy).
- Direction: long only, short only or both. With both, you choose what happens when an opposite signal arrives while a position is open: ignore, close or reverse.
- Indicators: defined once and used by name.
- Entry and exit rules, risk and position sizing.
Symbols, capital, leverage and the date range are not part of the strategy; you choose them in the backtest. The same strategy runs on different symbols.
Rules
| Block | Meaning |
|---|---|
| All / Any | AND / OR |
| Not | Negation of the inner condition |
| Compare | Greater, greater-or-equal, less, less-or-equal |
| Cross | Crossed above or below on this bar |
| Trend | Rising or falling for the last N bars in a row |
| Change | Changed by at least X percent over the last N bars |
| Pattern | A candlestick or SMC pattern formed within the last N bars |
Compared values can be price (open, high, low, close, volume and averages), an indicator output or a constant; "the value N bars ago" can be selected as well.
No data, no trade: if an indicator has no value yet (warm-up), the condition is "unknown" and produces no signal.
When trades are entered
Rules are evaluated at the close of each bar; orders fill at the open of the next bar. Values read from a higher timeframe come only from bars closed at that moment. The backtest never sees the future (no lookahead).
Each strategy holds at most one position per symbol (no pyramiding).
Risk
R is the distance between the entry price and the stop-loss.
| Setting | Options |
|---|---|
| Stop-loss | Percentage or ATR multiple; fixed at entry |
| Take-profit | Percentage, ATR multiple or R multiple |
| Trailing stop | Percentage or ATR multiple; optionally starts after a given profit (R) |
| Maximum duration | The position closes after N bars |
If the stop-loss and take-profit are both hit on the same bar, the backtest is pessimistic: stop first.
Position sizing
- Equity percent: each entry uses a percentage of equity as margin.
- Risk percent: sized so that hitting the stop loses at most X percent of equity (requires a stop-loss).
- Fixed amount: a fixed quote (USDT) amount per entry.
On futures, the position size is margin × leverage; you choose the leverage in the backtest.
Versions
Every change you save is a new version of the strategy; old versions never change. A backtest is always tied to a specific version, so results are reproducible. Versions can be opened from the history in the editor.