Describing a strategy
A backtest can only test the rules it is given. The more of them you state, the fewer the AI has to choose for you.
What a complete description covers
- Market and bar size
The symbol and the bar size, for example “AAPL on 15-minute bars”. See Market data for what runs.
- Entry
The exact condition, and the direction: long, short, or both.
- Exit
What closes the trade: an opposite signal, a number of bars, a time of day, or the stop and target.
- Stop and target
How each is measured: a percent from entry, a multiple of ATR, or a price level such as the prior swing low.
- Position size
A share of equity (“30% of equity per trade”), a fixed number of units, or a risk per trade. The engine buys whole shares, ounces and units of currency (a coin is held in fractions), and every run starts with the account size you stated, or $100,000.
- Session and timezone
For intraday rules, the hours and the timezone: “enter only between 10:00 and 15:00 New York time, flat by 15:55”. US stock intraday bars cover the regular session, 09:30 to 16:00 New York time.
- Costs
Commission and slippage, as a percent or in basis points. See Costs.
Good and vague
VagueTrade QQQ when it’s oversold and take profits quickly.
“Oversold”, “quickly”, the bar size and the position size all have to be invented before this can be tested, and a different choice gives a different result.
SpecificQQQ on 1-hour bars, long only. Enter at the close of a bar when RSI(14) is below 30 and the close is above the 200-period simple moving average. Exit when RSI(14) crosses above 55, or at a stop 2% below the entry price. Put 30% of equity into each trade.
VagueA breakout strategy on Apple.
SpecificAAPL on 15-minute bars, long only. Enter when a bar closes above the highest high of the previous 20 bars, only between 10:00 and 15:00 New York time. Exit when a bar closes below the lowest low of the previous 10 bars, or at a stop 1.5 × ATR(14) below entry, and close any open position at 15:55. Put 30% of equity into each trade. Commission 0.01% per round trip.
Numbers the AI had to choose: /params go
A description sets rules; it rarely sets every number those rules need. “A strong candle” or “a pullback” needs a threshold before code can test it. The rules you state go into the code as you wrote them. A number the AI has to invent is a choice, and two runs of the same description can choose differently and get different results.
So when the AI had to choose a number, the run stops at a confirmation card first. The card lists each chosen value and why it was chosen, with a box to change it. Everything you did specify is already in the code and is not listed. Nothing is backtested until you run it, with the card’s button or with a command:
/params goruns with the values shown./params rsi_period=10changes a value (use the names on the card) and runs./params strike keytakes back something that was recorded from your message, so it is not applied.
When nothing was chosen for you, the run does not wait: the card just shows what was read from your words.
Position size and the account
A backtest starts with the account size you state (“my account is 25,000 dollars”), or $100,000 when you state none, and the result says which. A re-run of a version keeps that version’s account, as it keeps its costs.
The engine trades whole shares, whole ounces of gold and silver, and whole units of currency. Crypto is the exception: a coin is held in fractions, to one hundred-millionth. A share of equity is turned into the whole units, or the fraction of a coin, it can buy. An order too small to buy one unit of anything but a coin is declined, and a run with no trades for that reason says so instead of reporting a strategy that never signalled.
Costs
State costs as a percent or in basis points, for example “commission 0.05% per round trip, slippage 0.02% per side”. Commission is read as a round trip unless you say it is per side, in which case it is doubled. Slippage is per side and is charged on entry and on exit. When you state nothing, these defaults apply:
| Market | Commission (round trip) | Slippage (per side) |
|---|---|---|
| US stocks and ETFs | 0.5 bp | 1 bp on daily bars, 2 bp intraday |
| Spot crypto | 20 bp | 5 bp |
| Spot FX | 0.2 bp | 0.5 bp on daily bars, 1 bp intraday |
| Spot gold | 0 bp | 1 bp |
| Spot silver | 0 bp | 4 bp |
Changing a strategy
After a result, say what to change: “tighten the stop to 1.5%”, “only trade on Tuesdays”. Each change runs as a new version, and later commands act on the newest one.
To move a number without asking the AI, use /tweak name=value. It re-runs the last strategy with the new value, and the AI does not rewrite anything.
Not answered here? Write to us through the Support page.