Futures Grid

Published on Jun 17, 2022Updated on Apr 4, 20246 min read

Futures Grid is temporarily not supported under portfolio accounts.

1. What is Futures Grid trading?

Futures grid trading is an automated strategy that trades futures contracts with preset intervals within a specific price range. The strategy will continuously buy low and sell high for each grid defined, and profit from the volatile market.

The futures grid currently supports all USDT-margined contracts and will support crypto-margined contracts in the future.

2. Use cases of Futures Grid trading

The essence of futures grid is "volatility arbitrage", so the strategy is suitable when the market is sideways or volatile with the price continuously fluctuate within a range. Meanwhile, the futures grid strategy can be directional, in which:

  1. Long Futures Grid: The bot only possess long positions and earn profit by closing it when the price increases. It works the best in volatile market with bullish outlook.

  2. Short Futures Grid: The bot only possess short positions and earn profit by closing it when the price drops. It works the best in volatile market with bearish outlook.

  3. Neutral Futures Grid: The both possess both long and short positions, in which the bot will short the futures contracts when price is above the base price and long the futures contracts when the price is below the base price.

User can select the corresponding futures grid strategy based on its insight on the market outlook.

3. How do I set up a Futures Grid trading bot?

3.1. Steps Overview

  1. Enter OKX on your PC or mobile and navigate to Trade, select Trading bot mode (at the top left corner on the web and top right corner on the mobile app), and click Futures grid.

  2. Enter parameters manually or use backtested AI parameters on the trading interface, and confirm the total investment amount to create a grid trading bot(After you create a bot, the initial funds will be isolated from your trading account and used for grid trading only).

  3. You can view and manage your bots on the Bots page.

3.2. Options and parameters

Setup Options

Set myself: Set parameters based on your own analysis of the market.

Set myself - Auto fill: Automatically fill in parameters recommended by the trading bot, based on backtested strategy.

AI strategy: Use the parameters recommended by backtested strategy (These parameters are based on a weekly backtest of this pair).

Grid Trading Parameters

Lower price: The bot will stop placing orders when the market price is lower than the lowest price.

Upper price: The bot will stop placing orders when the market price is higher than the highest price.

Grid quantity: The number of grids represents the number of pending orders divided in the price range. For example, if the price range is 100-400, the mode is arithmetic, and the number of grids is 3, it is divided into three grids: 100-200, 200-300, and 300-400.

Grid - Arithmetic grid: It keeps the same common difference between each grid. (For example: 1, 2, 3, 4.)

Grid - Geometric grid: It keeps the same common ratio between each grid. (For example: 1, 2, 4, 8.)

Leverage: The leverage used when trading contracts in the strategy. The maximum leverage currently allowed is 5x.

Used margin: The actual amount that was invested in this grid strategy. It will be separately used after grid starts working

Advanced - Take-profit (TP)/Stop-loss (SL) price: The bot will stop working when prices reach a predefined TP/SL value, and close all positions by placing a market order.

Open a position when strategy activates: You can open your first position when activating strategy. For example, if you open a position in long grid, the position price will automatically be higher than the current market price. You can profit from closing long when the price increases. Likewise for short position.

Total amount: Total amount with leverage, calculated as Used margin * Leverage.

Estimated liquidation price (Long): Estimated liquidation price of the long position with the maximum opening amount, on the assumption that all long orders in the grid are filled.

Estimated liquidation price (Short): Estimated liquidation price of the short position with the maximum opening amount, on the assumption that all short orders in the grid are filled.

(Order parameter) Estimated liquidation price: Estimated liquidation price of current positions.

(Order parameter) Actual leverage: Measure the actual leverage risk of current positions, calculated as Current positions value / Equity of strategy account.

3.3. Sample Case (BTC/USDT Futures)

Bot Parameters

Grid property: Long grid

Lowest price in range: 50,000 USDT

Highest price in range: 100,000 USDT

Grid Quantity: 50

Grid mode: Arithmetic

Leverage: 2x

Used amount: 5,000 USDT

Open the first position: Yes

BTCUSDT futures price when activate strategy: 60,100 USDT

Run the Bot

  1. Stage 1 - Initial order placement: The system will calculate the price of each grid, which are 50,000, 51,000, 52,000...98,000, 99,000, 100,000 USDT, and then place buy orders with 2x leverage in each grid. If the market depth is great, the buy orders will be filled above the market price and position opened, and the close sell orders will be placed at the price of each higher grid.

So, after the Bot starts, there are buy orders at each grid from 50,000 to 60,000 USDT and sell orders at each grid from 62,000 to 100,000 USDT.

  1. Stage 2 - Bot operation: A buy order will be filled when prices drop below 60,000 USDT, and in the meanwhile, a sell order will be automatically placed at the price of 61,000 USDT (which is the nearest grid above 60,000 to 61,000 range). If prices rise, after a sell order is filled, in the meanwhile, a buy order will be placed in the nearest grid below.

In this way, the Trading bot helps you make profits by placing and filling orders in a price range. It allows you to take advantage of a volatile market.

4. Risk reminder and notes

  1. If the current price falls below the 'Lower Price' defined, the bot will stop placing new orders. If the price continues to fall and is not recovering back to the grid price range, the position held by you will suffer losses, and might result in forced liquidation if leverage is applied. Therefore, it is recommended to set a stop-loss price below the 'Lower Price' of the grid to avoid massive loss under worst scenario.

  2. The fund invested in the grid will be isolated from your Trading account and used independently for the Trading bot. Therefore, users need to pay attention to the risk of overall positions in your Trading account after transferring funds.

  3. While the futures grid bot is running, if encounters unpredictable circumstances such as suspension or delisting of the underlying crypto asset, the bot will be automatically stopped.