Futures Grid
Introduction to OKX Futures Grid Bot
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 and USDC-margined contracts and will support crypto-margined contracts in the future.
How does OKX Futures Grid Bot work?
The essence of the futures grid is "volatility arbitrage", so the strategy is suitable when the market is sideways or volatile with the price continuously fluctuating within a range. Meanwhile, the futures grid strategy can be directional, in which:
Long Futures Grid: The bot will enter long positions upon creation at market price, and take profits by closing long positions when the price rises. It works the best in volatile markets with a bullish outlook.
Short Futures Grid: The bot only possesses short positions and earns profit by closing it when the price drops. It works the best in volatile markets with bearish outlook.
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
Users can select the corresponding futures grid strategy based on its insight on the market outlook.
How to get started
Web: Navigate to Trade, select Trading bots - Marketplace, and click Futures grid.
App: Navigate to Trade, select Trading bots, and press Futures grid.
Enter parameters manually, copy lead traders' bots, or use backtested AI parameters, and confirm the total investment amount to create a Futures grid bot (After you create a bot, the initial funds will be isolated from your Trading account and used for grid trading only).
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).
Lead bots: Copy lead traders' winning bots on the Marketplace in one-click
Grid Trading Parameters
Lower limit: The bot will stop placing orders when the market price is lower than the lowest price.
Upper limit: 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 into 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 50x.
Invested margin: The actual amount that was invested in this grid strategy. It will be separately used after the grid bot starts running
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 on creation: You can open your first position when activating strategy. For example, in a long grid, you’ll build partial positions at the market price once a bot is created, and profit from closing long positions when the price increases, and likewise for short positions.
Total amount: Total amount with leverage, calculated as Invested 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.
Managing your Futures Grid bot
Web: Head to OKX Trading Bots homepage, and select 'My bots'. You will be brought to a Bot Dashboard where you can manage your running bots.
App: Head to OKX Trading Bots homepage, and select 'My bots'. You will be brought to the "My bots" page where you can manage your running bots.
Grid bot management features
Increase Positions: Enhance your investment by increasing the amount allocated per grid beyond the original value. This adjustment effectively raises the value of each grid from that point forward.
Adjust Margin: Allocate additional margin to reduce liquidation risk without altering the amount allocated per grid.
Stop your bot: When you stop this bot, the system will cancel all pending orders and sell your crypto at market price. Funds from the sale will be returned to your trading account.
Details: View more details about your running bot by accessing the Bot Details page.
Replicate parameters: One-click set-up to recreate your running bot with the same parameters
Case Example
Suppose Trader A creates a Futures Grid Bot strategy based on the following parameters:
Trading Pair: BTCUSDT perpetual
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
BTC/USDT Futures price when strategy is activated: 60,100 USDT
Running the Bot
Stage 1 - Initial order placement: The system will calculate the price of each grid level, which will be 50,000 USDT, 51,000 USDT, 52,000 USDT...98,000 USDT, 99,000 USDT, 100,000 USDT, and then place buy orders with 2x leverage in each grid. Once a buy order in a grid gets filled, the corresponding sell order will be opened one level above. Upon bot initialisation, 50 buy orders will be placed all the way from 50,000 USDT, 51,000 USDT, 52,000 USDT...99,000 USDT. With the market price at 60,100, all the buy orders from 61,000 USDT and upwards will be filled immediately, and corresponding sell orders will be raised for each of the filled buy orders. Finally, the bot will have a buy order at each grid level from 50,000 USDT to 60,000 USDT and a sell order at each grid level from 62,000 USDT to 100,000 USDT.
Stage 2 - Bot operation: A buy order will be filled when the price drops below 60,000 USDT, and in the meantime, a sell order will be opened at the nearest grid level above (61,000 USDT). Alternatively, if price rises above 62,000 USDT, the sell order at 62,000 USDT will be filled, and in the meantime, a buy order (61,000 USDT) will be opened at the nearest grid level below.
Scenario - Bot out of range: If the market price falls outside the price range, you can choose either to terminate the strategy, or wait for the price to return to the range you’ve set. If you have chosen to terminate your bot, all your pending orders will be canceled and your positions will be closed at the current market price. Your assets will be credited automatically to your Trading account.
Risk reminder and notes
If the current price falls below the 'Lower limit' 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 in the worst scenario.
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.
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.