Grid trading: paired orders, inventory and total profit or loss

AI Trading Ranked

Last Updated: 2026-10-26

Risk warning: The examples are synthetic. A grid can lose money even while its completed pairs show gains. No annual return or suitable allocation follows from these examples.

A grid places orders at a series of prices. In a simple spot version, a filled buy can be paired with a sell at the next higher level; a filled sell may trigger a replacement buy below. The actual order lifecycle depends on the implementation. Price touching a level does not guarantee that your order filled.

Levels, intervals and order size

A range from $90,000 to $100,000 divided into 20 intervals has a $500 step and 21 boundary levels. Software may use “grids” to mean intervals or orders, so check its displayed prices instead of assuming the label.

Buying 0.001 units at $94,500 and selling them at $95,000 produces a gross $0.50 gain, not $500. With an illustrative 0.1% fee on each fill, the purchase costs $94.5945 and the sale returns $94.905: $0.3105 net. That excludes other charges and assumes both fills occur at those prices. A larger advertised spread does not establish a realized spread after queue position, partial fills and fees.

An arithmetic grid uses equal absolute steps. A geometric grid uses equal ratios. For the same bounds and 20 intervals, the geometric step is (100000 / 90000)^(1 / 20) − 1, about 0.5282%. Do not divide the overall percentage range by the interval count and call it an exact geometric step.

A profitable pair can sit inside a losing account

Consider an unleveraged account with $1,000, initially holding 0.5 units at $1,000 per unit and $500 cash. Ignore costs for this example.

Scroll sideways to see every column. Keyboard: focus the table region and use the arrow keys.

EventCashUnits heldEquity at current price
Start, price $1,000$5000.5$1,000
Buy 0.1 at $900$4100.6$950
Sell 0.1 at $1,000$5100.5$1,010
Price falls to $700; no further fill$5100.5$860

The completed pair made $10. The remaining inventory lost $150 relative to its initial value. Total change is −$140, before costs. A “grid profit” counter can keep rising while total equity falls.

Reconcile cash plus inventory marked at a stated price, minus liabilities, against opening equity and net deposits. For a practical exit estimate, use executable bids and expected exit charges rather than a last-traded price. Do not subtract fees twice if reported cash or profit already includes them.

What happens outside the range?

Below the lower bound, a buy ladder can leave the account concentrated in the asset with little cash. It does not ensure recovery. Above the upper bound, a sell ladder may leave mostly cash and miss further appreciation. A second, wider grid adds another position; it is not automatically a hedge.

Unleveraged spot holdings do not have a perpetual-contract liquidation price, but asset and custody losses remain possible. Futures or borrowed positions add margin, funding and liquidation mechanics; other collateral can also be affected in shared-margin accounts. A stop instruction may slip, fail or execute partly—it is not an exact loss ceiling.

“Reverse” and “infinity” are product labels, not complete risk definitions. A reverse spot arrangement can start with the base asset and seek to accumulate more units; it need not be a leveraged short. Read which asset is held, what the bot buys and sells, its denomination of profit and its termination rules.

A useful paper check before comparing implementations

Write down the initial cash and inventory, every level and quantity, maximum reserved capital, costs, and the action after a range break. Test a round trip, a one-way decline, an upward breakout, a partial fill and a restart with an already-open order. Reconcile the order history before creating replacements. Two grids on correlated assets can lose together.

The worked grid tutorial expands the inventory ledger. The workflow comparison separates exchange execution from paid automation. Subscription cost, market fees and custody are different decisions; there is no platform winner hidden in the arithmetic.

Disclosure: The site may earn affiliate commissions elsewhere. This primer contains no live test claim, performance forecast or provider endorsement.