Strategy Builder
Members
| Instance | Definition | Qty | Priority | Mode | Caps |
|---|
| Member | Trades | P&L $ | Fees $ | Fees saved $ | Blocked | Health |
|---|
Trades (combination)
| Member | Side | Entry time | Entry | Exit time | Exit | Reason | P&L $ | Entry fill | Exit fill |
|---|
—
Long
Short
| Time | Side | Qty | Entry | Stop | Target | Exit time | Exit | Slippage | Commission | Pts | $ | Mode | Reason |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No trades yet | |||||||||||||
Strategy builder guide
A strategy is a named set of versions. A version number stays the same while you edit a draft of it. The next number starts only when you click New version.
Drafts and versions
- New draft from version copies the frozen version you are looking at into a working draft with the same number. The frozen copy stays what already-running instances use. The draft is the one you can edit.
- New version starts the next number as a draft, with a blank description. If you already have a draft of a frozen version, New version moves that draft to the next number and leaves the frozen copy where it is.
- Freeze / publish locks the draft. When a frozen copy of that number already exists, it stays on instances that were pinned to it and drops out of this list. The draft you just froze is the version the library shows.
- Running a draft in sim, or creating an instance on it, also freezes it.
- Only one draft can be open for a strategy. Freeze it, or turn it into the next version, before starting another.
Formulas
Add custom condition opens the formula builder. Type the formula, or click an indicator, field, function, or operator to insert it at the cursor. Each button shows the syntax and inserts a working example. length is how many bars the indicator looks back. period is how many 1-minute bars make one of those bars, so indicators from different timeframes can be mixed. rsi(14, 5) is a 14-bar RSI on 5-minute closes. st(7, 2.5, 5) is a SuperTrend of length 7 and multiplier 2.5 on 5-minute bars, and st(7, 2.5, 15) is the same on 15-minute bars. atr(14, 30) is a 14-bar ATR on 30-minute bars. ma(20, e, c, 5) is a 20-bar exponential average of 5-minute closes: type s is simple and e is exponential; price c is close, o open, h high, l low, m median, and t typical. hh(20, 5) is the highest high and ll(20, 5) is the lowest low. Leave period off and the indicator uses 3, the chart bar: rsi(14) is rsi(14, 3). abs, min, and max are available, along with + − × ÷ and comparisons. abs(st(7, 2.5, 3) - st(7, 2.5, 5)) > abs(st(7, 2.5, 3)[1] - st(7, 2.5, 5)[1]) means the gap between the 3-minute and 5-minute SuperTrend is wider than on the previous bar. A mistake is highlighted while you type. When a preview bar is loaded, the builder shows whether the formula passes and the two numbers in the comparison. Each custom condition is saved on its own and must pass along with the checked conditions. An empty list leaves the existing conditions alone. Unchecking a custom condition turns that one gate off. Removing it deletes only that condition.
The bracket is how many closed 3-minute bars back to read, whichever period the indicator uses. [0] is the bar just closed. [1] is the previous 3-minute bar. [5] is five 3-minute bars ago. If that older bar is not available yet, the formula does not pass. The indicator value is the one already closed by that 3-minute bar. Older names are read as the default calls: st3 is st(7, 2.5), st5 is st(7, 2.5, 5), rsi3 is rsi(14), and atr30 is atr(14, 30). Those defaults are the usual SuperTrend and RSI settings. A strategy whose SuperTrend knobs differ from 7 and 2.5 still keeps its chart line; a rewritten st3 formula uses 7 and 2.5.
Chart
The box in the lower left follows the bar under the mouse. It shows that candle's open, high, low, and close. An entry on the bar shows the side, size, fill, stop, and target. An exit shows the reason, fill, points, and dollars. A bar between the entry and the exit shows the side and size still open, and the stop and target in force on that bar.
Compare versions
Compare versions opens under the date row. Versions are listed down the left of the card, each with its number and description. The table and equity chart fill the right. It backtests the version you are looking at plus one other, using the symbol, dates, and fees already filled in. A draft and a frozen copy are separate rows, even when they share a version number. Check the ones you want and click Run compare to run them again.
Description
The description is a label so you can tell versions apart. It can be up to 200 characters, including on a frozen version. Saving it does not change the strategy parameters or the revision counter. A new version starts with a blank description. A draft of the same version keeps the note.
Combination members
After a combination is created, Add member lists every frozen version in the library. A version already in that combination is left out. Choosing one creates a simulated instance of that version on the combination's symbol and adds it. A draft stays off the list until it is frozen. Remove takes that strategy out of the combination and leaves the combination saved, even when it is the last member. A combination already in the list opens for editing: its name, symbol, caps, and members can all be changed. Disarm it first while it is live.
A version as its own strategy
The + beside a frozen version in the library creates a new strategy from that version's parameters and asks for its name. The name starts as whatever is in the strategy name box, or the strategy plus the version number when that box is empty. Cancel leaves the library unchanged. The trash icon deletes that version, or the whole strategy. A version an instance is running, and a strategy's last version, stay until that instance is stopped or the strategy itself is deleted.