Build strategies

Pair trades & Baskets

A Pair trade or a Basket trades several crypto perpetual futures (“perps”), or several stocks, together as one strategy. Each asset it holds is one leg. A Pair trade holds its legs on opposite sides so they hedge each other. A Basket ranks its assets and holds one end of the ranking. On crypto perps, each runs as its own agent on Paper, Hyperliquid or Propr.

Pick the mode

Pair trade: usually two assets, for example ETH against BTC, but it can hedge one asset against up to nine others. The first asset sits on one side and the others hedge it on the other side; a short trade reverses every leg. It opens in one of two ways:

  • Gap reversion (the default): it opens when the weighted price gap between the assets is far from normal, and closes when the gap comes back, at your stop, or after a maximum hold.
  • Signal: one ordinary trigger, plus optional filters, read on the first asset opens and closes the whole pair. You choose how the other legs hedge it: beta-neutral, dollar-neutral 1:1, or your own weights.

Basket: scores 2–10 assets with the same rule at every rebalance and holds one end of the ranking: it can go long one end and short the other, long only, or short only. Example: rank eight coins by momentum and rebalance daily.

Single is the normal graph. Reading BTC as a filter for an ETH trade is still Single, because only ETH is traded.

What you can trade

  • 2–10 different assets, all on one timeframe: 1H, 4H or 1D.
  • Crypto perps: every asset must be a Hyperliquid perp with funding data.
  • Or the stocks Hyperliquid lists: TSLA, NVDA, AAPL, GOOGL, INTC and MU. A strategy on stocks is backtest-only for now: fees and slippage are charged on every leg, no funding is charged (Trigr has no funding history for these markets), and it can’t run as an agent or be published yet.
  • Crypto perps and stocks can’t be mixed in one strategy. Indices, commodities and PAXG are refused.
  • A Basket ranked on a data series (funding, open interest and similar) needs that series for every asset.

Build it in Studio

  1. Pick Pair trade or Basket in the mode switch. On a new draft, switching replaces the graph and Undo brings it back; on a saved strategy, Studio offers to save the new mode as a new strategy.
  2. Choose the assets and the timeframe.
  3. Set the mode's rules (below).
  4. Set size and leverage in Risk. Size is the share of your equity the whole group uses; leverage is the most any leg may use. Together they must commit at least 10% of your equity.
  5. Sign in and run a backtest.

Pair trade rules

  • Gap reversion: how the leg weights are found (estimated from recent history by the Johansen, OLS or Kalman method, or Fixed: the weights you type), how far from normal the gap must be to open, to close and to stop out, and an optional maximum hold. The weights are fixed when a trade opens and kept until it closes.
  • Signal: the trigger and filters on the first asset, the hedge sizing, and the pair's exits: take profit, stop loss and trailing stop (a percent of the first asset's entry size, on price moves, checked at every 5-minute close), a maximum hold, closing when the signal flips or goes flat (on by default), and exit formulas. A filter that stops passing can also close the pair, if you set it to.
  • Direction: trade both sides or one.

A Pair trade never reverses in one bar: it closes, and can open the other way from the next bar close if its entry still points that way.

Basket rules

  • Score: what each asset is ranked by. The highest score goes long for momentum, rate of change, MACD, distance from average, open-interest change, CVD and taker delta. The lowest goes long for RSI (most oversold), volatility (calmest), funding (carry), long/short ratio (least crowded) and liquidation imbalance.
  • Side: long one end and short the other, long only, or short only.
  • How many and how often: how many assets to hold per side, and how many bars between rebalances.

Regime filter

A Basket can hold only while a market condition is true, for example “BTC above its 200-candle average”. In Studio press Add a regime filter on the Basket, then edit its steps like a single-asset strategy: indicators, data series and formulas, on any asset, on the Basket's candles or longer ones, combined with All / Any / Score / Groups (AI simulations, ML models, copied accounts, marketplace strategies and uploaded series can't gate a Basket yet).

  • While the steps together read false, the Basket holds nothing: every leg closes at that candle's close (shown as “Regime filter off” in the trades).
  • Once they read true again, the Basket comes back at its next rebalance.
  • A candle where a step has no data yet holds the Basket as it is; a backtest starts where the steps' own data starts.
  • Use conditions that stay true for a while (a price above an average, a trend state). A one-candle event such as a cross is true only on that candle, so the Basket would barely hold.

The agent reads the same steps on the same closes as the backtest and waits for late data instead of guessing. The result shows how often the filter kept the Basket flat. The filter never picks the Basket's side.

A Basket only rotates. At a rebalance it opens new members, closes the ones that drop out and flips the ones that change side, in the same bar. An asset that stays in keeps its size until it rotates out (unless the leverage cap below trims it). The backtest and the agent follow the same rule.

Copilot can build both modes. Try “Build a BTC ETH pair trade on 4H” or “Rank BTC ETH SOL AVAX and rotate into the strongest.” AI assistants can do the same over MCP.

Margin and leverage

In the backtest, on Paper and on Hyperliquid:

  • Every leg is its own position with its own margin (isolated margin). It opens at the strategy's leverage, and that is a hard cap: a leg never runs above it.
  • A book opens at most at 90% of its cap (leverage × equity), so a strategy at 100% size opens at 90%. That headroom keeps a fresh book from being trimmed on its first losing bar.
  • At each bar close the group's leverage is checked: the total size of its legs divided by the group's equity. Above the cap, every leg is trimmed by the same fraction back to 80% of the cap (further if the venue's minimum order size needs it): fewer, larger trims. When a trim can't meet that minimum, the whole group is closed.
  • A leg whose losses use up its margin is liquidated, even at 1× on a short.
  • Per-leg stop (optional). Set a leg stop % on the Size node: when a leg has lost that share of its entry value, a Pair trade closes every leg, and a Basket closes that leg only (it can come back at a later rebalance). Worth setting on long/short Baskets, whose short legs can run far.
  • Stops on 5-minute closes. The per-leg stop and a signal Pair trade's take profit, stop loss and trailing stop are checked at every closed 5-minute bar, not only at the strategy's bar close, and fill at that 5-minute close: the backtest and the Agent do exactly the same, so a stop protects you inside a long candle too. If the venue would liquidate a leg first inside that 5-minute bar, it is a liquidation. An asset without 5-minute history is checked at the bar close, and the result says so. Entries, rebalances and signals still use the strategy's timeframe.
  • Wait after a stop. Optional: after a stop, no new entry for that many candles (a Basket: the stopped leg only), so a signal that is still on does not reopen right away. New strategies start at 1 candle; 0 means no wait.

Hedge sides. A hedge the engine estimates (Johansen, OLS, Kalman, or beta sizing) can put a hedge leg on the same side as the first asset, where it adds to the bet instead of hedging it. Every Pair trade result counts those entries and flags them in its checks. Choose “Opposite sides only” on the hedge node to take only entries whose hedge legs all sit against the first asset; the others are skipped, never resized. An estimated hedge can also shrink toward zero: when an entry's hedge legs together hold less than 10% of the first asset's entry notional, the first asset was effectively unhedged, and the “Hedge sides” check says how many entries did that and the smallest hedge seen (a review note, not a failure).

On Propr, legs follow your Propr account's margin mode and rules. Propr, not the strategy, decides the leverage a leg finally opens at, and the bar-close leverage trim does not apply there. A leg whose Propr leverage limit is below the strategy's leverage is refused, never silently lowered.

Credits and costs

One backtest costs 50 + 10 × (assets − 2) credits. You must be signed in.

AssetsCredits
250
580
10130

Every result also shows the run after Trigr's default costs on every leg:

  • Slippage on every fill, by how liquid the market is: 0.02% for BTC and ETH; 0.05% for SOL, XRP, DOGE, BNB, AVAX, LINK and SUI; 0.10% for other crypto. A Basket charges each leg its own rate. A Pair trade charges every leg the highest rate among its legs.
  • Real funding on every leg, from the venue's history (Binance funding where the venue's history is shorter).
  • Trading and builder fees on every leg.

Studio leads with the after-costs return once those costs are settled, with the run's own return beside it. When a cost could not be charged (a missing funding history, for example), the result says which leg and why. Published statistics use the run's own figures. The run starts when every asset has data, so a young coin shortens the test window: check the window shown on the result.

Read the results

  • The trade count counts positions. One Pair trade on three assets is one trade with three legs.
  • The trade list shows every leg: asset, side, entry and exit. The per-asset breakdown shows each asset's profit, fees and funding.
  • A gap-reversion Pair trade adds a chart of how far the gap was from normal. A Basket shows its recent picks. The run lists leg liquidations and counts leverage trims.
  • The Prop firm tab replays the run's own equity curve (before Trigr's default slippage and funding) against Propr challenge rules.

Publish it

A Pair trade or Basket publishes to the marketplace like any strategy, from the backtest the server verified. Cards show the assets as icons with a mode badge, for example “Pair trade · 3 assets”, plus the timeframe and direction. The hedge method, weights, entry and exit levels, size and leverage stay private.

Someone who deploys your published strategy gets its current published version, measured by your verified backtest at publication. Their agent keeps the version it was deployed from; a new publication reaches only new deploys.

Run it as an agent

A Pair trade or Basket runs as its own agent: an agent that trades this one strategy and nothing else.

  • It trades exactly the strategy's assets, one position per asset. You can't add or remove assets or strategies, and it can't be mixed with other strategies in a new agent or an existing one.
  • It runs on Paper, Hyperliquid or Propr. Venue, account and capital are set when you create it. You can rename, pause, start and delete it.
  • It takes its risk from the strategy: agent risk rules such as a daily loss limit or a cooldown after a stop loss can't be set on it. The strategy's own exits apply, including its own wait after a stop (set on the strategy's Size node).
  • Its size is the strategy's own, or a whole multiple of it (2× to 5×) that you choose when you deploy. For a larger size Trigr raises the legs' leverage only as far as that size needs, and offers only the sizes the venue's leverage limit allows on every one of its markets. The size can't be changed afterwards. A backtest shows the strategy's own size: at a larger size gains and losses are larger, and where the leverage was raised a leg can be liquidated sooner.

Create and start

Run a backtest of the saved strategy first. The agent is pinned when you create it to the version your latest backtest measured, so you don't need to run it again after a reload.

  • From Studio: press Create agent on the result and pick where it runs. Paper creates the agent paused: press Start on the agent page. It counts toward your plan's paper agent limit.
  • From the strategy page: Deploy opens the same choice. Deploy on paper there starts the agent right away. On someone else's published strategy, it uses the current published version.
  • Hyperliquid: pick or create the account the agent trades, approve its trading key and builder fee, and fund it. The screen shows the smallest balance at which every leg clears Hyperliquid's minimum order. The agent's capital is that account's balance. Nothing trades until you confirm.
  • Propr: connect your Propr key and pick the challenge or funded account. There is no challenge-rules replay for a Pair trade or Basket: compare its backtest's worst day and drawdown with the account's limits before you confirm.

Before you fund or connect anything, the screen checks each venue and says in plain words when one can't run the strategy: a market the venue doesn't list for agents right now, or a venue leverage limit below the strategy's leverage.

Editing the strategy later never changes an agent you created; to run the edited version, create a new agent. If Start says the backtest is outdated, re-run the backtest of the unchanged strategy, then press Start.

From MCP, trigr_create_agent with one slot naming your Pair trade or Basket creates the same paused agent on Paper, after your approval, and trigr_start_agent starts it after its own approval (the same checks as Start in the app). MCP creates and starts Paper agents only: Hyperliquid and Propr agents are deployed and started in the Trigr app. See AI agents & MCP.

How it trades

  • The agent checks the whole group at every bar close, and its stops at every closed 5-minute bar, with the same engine as the backtest.
  • Before any order, it checks that every leg can open: minimum order size, margin, the venue's leverage limit, and that no one else holds the coin on the account (another agent or a manual trade). If one leg can't, nothing opens and the agent page says why.
  • Paper opens every leg at once. Hyperliquid and Propr open one leg at a time, each after the previous one is confirmed, all within 10 minutes of the first. If too little of the bar is left to finish, the agent skips that entry and waits for the strategy's next entry (a Basket's next rebalance).
  • A Basket leg that changes side is closed and reopened on the new side in the same bar; the book is never half reversed. A Pair trade closes, and can open the other way from the next bar close.

When a leg can't trade

The group trades as one or not at all. The agent closes every position in the group and pauses when:

  • a leg order is refused or expires after orders were sent;
  • some legs are open without the others, for no known reason;
  • a leg order does not settle within 10 minutes;
  • the strategy engine gives no answer for three bars while legs are held, or can no longer evaluate the group;
  • the group no longer matches its strategy.

It closes every position and keeps running (it waits for its next entry) when a venue liquidates a leg, a leverage trim can't be placed, the legs don't all enter in time, a leg fills only in part, or the next leg is refused before its order is sent.

While a pause waits for the group to close, the agent page shows Pausing this agent. No new trades open until the pause is done. Check what happened, then press Start again when you are ready.

The agent's Backtest and Prop tabs show the strategy's stored backtest at the agent's capital. They never start a new paid run.

Continue with backtesting, trading agents, or prop challenge simulation.