← Back to the general documentation
Laboratory guide
How to test your trading ideas on real data, save them and make them trade by themselves, one or several at once. It is simulated money for educational purposes: none of this is investment advice.
What the Laboratory is
The Laboratory is a test bench for your trading ideas. Before risking anything, you see what would have happened with that idea over the last years of BTC, ETH and SOL, costs included. Everything is computed in your browser on real candles since 2020 (1 hour, 4 hours and 1 day). If you like it, you save it and can enable it so it trades by itself in your simulated account.
- Mix bots: combine pieces of the bots on the leaderboard to build your own mix.
- Build with indicators: write a rule with indicators (for example “buy when RSI is low and volume is high”).
- Portfolio (several at once): test and enable several strategies together in the same account.
You need an account to enter. Everything is simulated money for educational purposes: a good result in the past guarantees nothing in the future.
Mixing bots
A mix is made of ingredients (up to 4). Each ingredient starts from a bot on the leaderboard (bots are listed by competition month and, inside each month, by their rank) and has six aspects you can adjust:
| Aspect | What it decides | Options |
|---|---|---|
| Signal | When to buy and when to sell | Trend following, mean reversion, moving-average cross, breakout, Donchian, average filter, buy and hold, random… |
| Direction | Whether it only buys, only sells or does both | Long and short · Long only · Short only |
| Size | How much it invests | Fixed · Volatility-adjusted (with a yearly % target) |
| Leverage | How many times your capital it can move | From 0.25× to 3× |
| Rebalancing | When it readjusts the position | Always · With band · Minimum threshold (with a % change) |
| Brake | Whether it steps aside after losing a lot from its peak | See The brake |
Each aspect has a checkbox: unchecked means neutral (the aspect “does not exist” for that ingredient). The signal is mandatory. Opening “Adjust this ingredient” lets you pick each aspect's option directly.
Weights and budget
- Weights. One bar splits 100 % among the ingredients. Drag the dividers; each ingredient has at least 5 %.
- With a single ingredient the weight does nothing. It is always 100 % (there is nobody to share with, which is why the bar has no dividers), so it does not change what the strategy does. What does act is the budget below, and it combines with the leverage the recipe already has: with Investment cap the strategy trades with its own leverage and is only cut if it asked for more than the cap (recipe 2× and cap 1×: it never goes above 1×; with a cap of 2× or more, nothing changes); with Use all the leverage the whole strategy is scaled so that its maximum matches the cap (recipe 2× and cap 3×: everything is multiplied by 1.5; recipe 2× and cap 1×: by 0.5). With several ingredients, the weight multiplies what each one asks for before they are added.
- Budget. Two ways to size the mix: Investment cap (each ingredient invests according to its own recipe and, added up with their weights, you never go above the cap) or Use all the leverage (it is scaled so that, with every ingredient at the maximum of its recipe, you land exactly on the cap). The cap goes from 0.25× to 3× your capital.
- Over several assets and candle sizes. You can tick several assets and several candle lengths: the same mix is tested on each combination (up to 12) and you get a comparison table. If it only works on one combination, it is probably chance.
- Cost per trade. 0.07 % by default (fee plus slippage).
How to read the result
You get a chart (your mix, each ingredient and buy and hold) and a table with: total result, return per year, maximum drawdown, quality (Sharpe ratio), position changes and time invested, plus a year-by-year breakdown. Look more at the maximum drawdown and whether it wins in several years than at the total: one spectacular year is usually luck.
“Surprise me” and “Random”
- Random builds a random mix without checking anything.
- Surprise me (30 per season, mixes and rules together, one every 2 minutes) tries many random mixes (300, or 120 with 1-hour candles; 1 to 4 ingredients each, with different signals, settings, weights, cap and budget, and across the assets and candles you have ticked) and then refines the best ones by changing one detail at a time. Only those that pass a filter count: they must win in the search period and keep winning in the next one. Among them it picks the one that ranks best overall on four measures: Sharpe, total result, yearly return (higher is better) and largest drop (lower is better): the candidates are ranked on each measure and the best combined position wins. Whatever you had built is replaced by what it finds.
- Three time slices. The first 60 % of the history is the search period; 60 % to 80 % is validation (the candidate must hold up); the last 20 % has never been looked at and shows as “After (NOT used in the search)”. That last row is the one that really counts.
- Limited use. It is an expensive search: there is a wait between searches (120 seconds) and a daily maximum per user (30). If it finds nothing, it says so: that is normal, finding something that holds up is hard.
Building with indicators
Here you write a rule with indicators: “when it is true, open a trade and hold it for N candles”. A rule has 1 to 8 conditions joined by AND (“both at once”) or OR (“one is enough”). Each condition compares an indicator with a value:
- Greater than / Less than a number.
- Between two numbers.
- Zone: the indicator is split into slices holding the same amount of data (quartiles) and you choose in which ones it acts. Example: “the 25 % of moments with the lowest volatility”. When saved, zones become exact numeric ranges, so the server uses the same figures you saw.
You also choose the holding time (H candles), whether it is a buy or a sell rule, and the costs (fee and slippage). The rule works like this, the same as live: when it is true on a closed candle, it enters at the open of the next one, holds for H candles and exits; there is only one trade at a time and no new entries are looked for while it is open.
The final test
The result you see while building the rule uses the first 70 % of the history. The “Check with new data” button tests it on the remaining 30 %, which had not been looked at. Do it only once: if you repeat it changing the rule until it works, you are fitting it to that slice and it no longer counts as a test.
Starting ideas and “Surprise me”
There are classic ideas ready to load (oversold with high volume, rebound after a sharp fall, trend following, euphoria with “OR”, compressed market). “Surprise me” tries hundreds of random rules (260 with 1-hour candles, 700 with 4-hour, 900 with 1-day) and keeps the best one that wins after costs in the search period and in the next one.
The 38 indicators
| Family | Indicators |
|---|---|
| Trend | Distance to the simple moving average (%); Distance to the exponential moving average (%); MACD histogram (% of price); Slope of the average (% over 10 candles); ADX · trend strength; Direction: DI+ minus DI−; Aroon oscillator; Consecutive up (+) or down (−) candles |
| Momentum | RSI · relative strength; Stochastic %K; Stochastic RSI; CCI · commodity channel index; Williams %R; Momentum: change over N periods (%); MFI · volume-weighted RSI |
| Volatility | ATR · average candle size (%); Bollinger %B position; Bollinger band width (%); Volatility of returns (%); Parkinson volatility (%); Volatility ratio: short / long |
| Volume | Relative volume; Volume Z-score; OBV · accumulated pressure (normalized); CMF · Chaikin money flow; Distance to the rolling VWAP (%) |
| Candles and price | Candle body (%); Upper wick (%); Lower wick (%); Opening gap (%); Position within its range (0–100); Distance to the N-period high (%); Distance to the N-period low (%); Price Z-score |
| Time | Hour of day (UTC); Day of week (0 = Monday … 6 = Sunday) |
| Other assets | BTC momentum over N periods (%); Strength relative to BTC (% points) |
Each indicator has its parameters (for example, the period of the average). Their definitions are the Laboratory's, and the server computes them exactly as the browser does: automated tests check it against six years of real data.
The brake
The brake is a protection of each ingredient. When the ingredient falls more than X % from its peak, a warning trips: it spends some days in cash and its peak is reset. Three settings:
- Fall % and days in cash after each warning.
- Warnings until it is retired (3 by default): on reaching that number, the ingredient is retired and stays in cash.
- Never retire it: there is only the pause after each warning; the ingredient always comes back.
- If retired, it trades again after N days (0 = never comes back). When it returns, warnings and the peak start from zero.
Why is my chart flat?
Almost always because the brake retired the ingredient: it has not traded since, and the line stays horizontal for years. With assets that often fall 20-50 % (like BTC) three warnings come quickly. The chart shows it with grey bands (grey background when every ingredient is stopped; with several ingredients, also a strip in its colour at the bottom) and a notice under the chart explains it. If you do not want it retired for ever, tick “Never retire it” or set it to return after some days.
Risk limits on the chart (the red X)
In the competition, an account that loses more than 5 % in a day (against the previous day's close, 00:00 UTC) or more than 10 % from its highest close is blocked. The Laboratory applies the same rules to your mix or portfolio and, on the first day it would break them, draws a red X on the chart and warns you:
That day your account would have been blocked and you would have been out.
Nothing is stopped here: the mix keeps going and the result does not change, so you can see how it would have ended. Only the first breach is marked because, in a real competition, the account would not trade after that day. If a good result has an early red X, in the competition you would never have got to see it.
Saving, exporting and importing
- Save. Enter a name and press save. You can keep up to 20 strategies. A mix stores its ingredients, weights, budget, costs and the assets and candles you studied; a rule, its conditions, holding time, direction and costs.
- Names. Two strategies cannot share a name (you can overwrite one). An enabled strategy cannot be deleted or overwritten: disable it first.
- Export and import. Each strategy downloads as a JSON file (marked as a TapeArena strategy) that you can import here or hand to someone else. On import everything is validated; a malformed file is rejected with a message.
- Load. “Load” brings the strategy back to the editor so you can change it.
Enabling a strategy
Enabling a saved strategy makes it trade by itself in your account with simulated money. The server evaluates it, not your browser, so it keeps running with the page closed.
- Budget or weight: 5 % to 100 % of your capital. With 50 % and a mix that wants to invest 100 %, the strategy keeps half of your capital open in that asset.
- Market. If you studied it on several assets or candles, you choose one for it to trade (only one at a time).
- When it decides. Every time a candle of its length closes. When you enable it, it is evaluated right away on the latest closed candle.
- Mixes. They compute the position they want; a change under 5 % is not traded. If they ask for less, they close only the difference (partial close, starting with the most recent trade); if they ask for more, they add; if they switch side (buy to sell), they close and open the other way.
- Rules. When true on a closed candle they open a trade with your budget, hold it H candles and close it, one at a time. They do not enter on a stale signal: if the candle closed more than 25 % of its length ago (plus a minute), they wait for the next one.
- Only their own trades. Each trade carries the origin “Strategy” with the name; the strategy only touches its own. It never touches your manual trades or your conditional orders, and it is subject to the same risk limits as you.
- Disabling closes that strategy's trades. In “Trade” you see the “Strategy running” card with its last evaluation, the next one and its position.
Several strategies at once
You can have up to 5 strategies enabled at once in the same account. There are two modes, and they cannot be mixed:
| By weights | By priority | |
|---|---|---|
| How it sizes | Each uses a fixed % of your capital (5-100 %); weights add up to at most 100 % | No weights: each uses its full recipe (100 %) |
| Priority | Not used | Decides when margin runs short (1 = most important) |
| Lack of margin | They do not compete: each has its share | Solved by the policy: wait or free margin |
The shared margin
All the account's positions together cannot go over the maximum leverage (3× your capital; the server also keeps a 1 % safety margin). If a strategy wants to open or add and does not fit, it depends on its policy (priority mode only):
- Wait: it does not open; it will try again at its next evaluation.
- Free margin: it closes, fully or partly, trades of less important strategies, from the least important up, only if that is enough. If it would not fit even after closing all lower-priority ones, it closes nothing. It never touches your manual trades or those of a more important strategy.
5,000 USDC account and a 3× cap (14,850 with the safety margin). A (priority 2) has 9,900 open. B (priority 1, “free margin”) wants to open 7,450. It is 2,500 short: B closes 2,500 of A and opens. If B were “wait”, it would not open. If A were the important one and B the secondary, B could not take anything from A and would wait.
How to change it
The mode is chosen when enabling the first one and stays fixed while any is running; to change it you must disable them. “Settings” changes the weight (weights mode) or the priority and policy (priority mode). If you press “Enable” while another is running, it takes you to the Portfolio tab to split the account among all of them.
Portfolio: joint backtest
On the Portfolio tab you pick 2 to 5 of your saved strategies (mixes or rules) and see what would have happened had they traded together in the same account. The same rules as live apply:
- Each strategy decides when its own candles close; everything is simulated on an hourly grid, over the period in which all have data.
- Split by weights (visual bar with dividers you drag; the grey part is unassigned capital) or by priority (a number and a policy per strategy).
- The margin is shared: editable maximum leverage (3× by default), with the wait or free-margin policies.
- Changes under 5 % are not traded; rules are not resized while they hold their trade.
You get the chart (portfolio, each strategy alone and buy and hold BTC), the results table, the red X for risk limits and a what happened with the margin table: openings that did not fit, times one freed margin from others and times margin was taken from it. The “alone” strategies run at 100 % of their recipe, not with the assigned weight, to show what each one contributes.
The “Enable these strategies exactly as configured” button enables them all with the split you see (it first disables any that were running, after asking you to confirm).
Backtest versus live: what differs
The Laboratory tries to make what you see and what later happens the same, but there are differences worth knowing:
- The data. The backtest uses historical candles; live, candles come from the competition's market. Prices are very close, not identical.
- The live brake may react up to two candles late, because the return of the last two candles is not yet known when deciding.
- An open trade keeps its units between evaluations: its weight in the account moves with the price until the next decision.
- Small rebalances. Live, a change under 5 % is not traded; a single-mix backtest rebalances on every candle. That is why a portfolio with one strategy comes out a little different from the loose mix (in one test, 2.43× versus 2.50×).
- Stale signals. Live, a rule does not enter if the candle closed a while ago; the backtest always enters.
- Market impact. Market depth is not simulated: orders fill at the candle price plus a fixed cost.
So the backtest tells you whether an idea deserves to be watched, not how much it will earn.
Usage limits
| What | Limit |
|---|---|
| Ingredients per mix | 4 |
| Conditions per rule | 8 |
| Saved strategies | 20 |
| Strategies enabled at once | 5 |
| Asset and candle combinations per strategy | 12 |
| Budget or weight | 5 % - 100 % (sum ≤ 100 % by weights) |
| Maximum leverage | 3× |
| “Surprise me” searches | 1 every 120 s and 30 per season per user (mixes and rules together) |
Frequently asked questions
Why is my Laboratory chart flat?
Almost always because the brake retired the ingredient after several warnings and it has stayed in cash since. You can tick “Never retire it” or make it trade again after some days; the chart shows with grey bands when it is stopped.
What does the Surprise me button do?
It tries hundreds of random mixes or rules on the chosen asset and candle and keeps the best one that wins in the search period and keeps winning in the next. The “After” row is the slice that was never looked at. You have 30 “Surprise me” searches per season (mixes and rules together).
Can I have several strategies enabled at once?
Yes, up to 5. They are either split by weights (a fixed percentage of the account each, up to 100 %) or by priority (no weights, and if margin runs short the order decides). The two modes cannot be mixed.
What happens if there is no margin to open a trade?
In priority mode, according to its policy: wait (it does not open) or free margin (it closes what is needed of less important strategies, only if that is enough). It never touches your manual trades.
What does the red X on the chart mean?
That day the mix would have lost more than 5 % in a day or more than 10 % from its peak, the competition limits: the account would have been blocked. Nothing is stopped here, you are just warned.
Is the backtest result what I will earn?
No. It is what would have happened in the past, with costs but with historical candles that differ from the live market. It is for discarding ideas and watching the ones that hold up, not for predicting profits.