Spread builder: test your own idea
Short version for experts: tables, lists and screenshots only.
Words in this lesson (11)
Why you need it
The screener shows the opportunities it found itself. But you may have an idea of your own: "I think these two instruments move together, and right now they've diverged". The "Spread builder" lets you write that idea as a formula and see how the spread actually behaved.
How to write a formula
An instrument is written as EXCHANGE:COIN — for spot, EXCHANGE:COIN.P — for perpetual futures. This is the widely used notation: you can paste tickers from other charting programs.
| Formula | What it calculates |
|---|---|
BYBIT:BTCUSDT.P - GATEIO:BTCUSDT.P | the futures price difference on two exchanges, in dollars |
BINANCE:ETHUSDT / BYBIT:ETHUSDT | the price ratio; 1.000 — the prices are equal |
BYBIT:BTCUSDT.P - BYBIT:BTCUSDT | futures minus spot on the same exchange |
(OKX:BICOUSDT.P / GATEIO:BICOUSDT.P - 1) * 100 | the spread in percent |
Addition, subtraction, multiplication, division and parentheses are available. Exchanges: Binance, Bybit, OKX, Gate, MEXC, Bitget.
Below the formula field there are ready examples — click any of them and it's filled in.
Step by step
- Type the formula. Below it you'll immediately see the spread value and the live prices of each instrument.
- Give it a name (optional).
- Click "Save and track 24/7" — MAMAY starts recording this spread's history.
- The spread appears in the "Tracked spreads" list. Click it to open the chart.
What to look for on the chart
- What value the spread oscillates around. That's its "normal".
- How far it moves away and how quickly it comes back.
- Whether it comes back at all. If the spread moved away and has been sitting at a new level for a week, there's no "normal" anymore, and you can't trade the return.
What the builder doesn't do
It shows the raw price spread. It has no fees, slippage or funding. Before trading, subtract the costs (the lesson "The math of an opportunity" in the "Arbitrage" track).
↗ Open "Builder / backtest" in MAMAY ▶ The math of an opportunity