What Is Long/Short Grid Trading?

2021-04-08 10:05
Tutorial
Order Logic
PnL Calculation

Disclaimer: In compliance with MiCA requirements, unauthorized stablecoins are subject to certain restrictions for EEA users. For more information, please click here.

What is Futures grid trading?

Futures grid trading is a trading bot that automates the buying and selling of futures contracts. The bot is designed to place orders in the market at preset intervals within a configured price range. Futures grid trading is ideal for volatile and sideways markets when prices fluctuate in a given range. This technique attempts to make profits on small price changes.

For more details, please refer to What Is Futures Grid Trading.

What is long/short grid trading?

Long/short grid trading is a popular algorithmic trading strategy that enables users to trade with the market trend within a grid trading system using a trading bot. With this bot, traders can choose whether to open an initial position (long or short) or create a grid without opening positions, based on their analysis and simultaneously place buy-limit and sell-limit orders at predetermined intervals to capitalize on market volatility and ranging conditions.

For example, a trader could open an initial long position in BTCUSDT to express his bullish view on Bitcoin. He can set up the Grid Trading Bot to place buy orders at every 1,000 USDT below the market price of BTCUSDT, while also placing sell orders at every 1,000 USDT above the market price of BTCUSDT. This allows him to trade with the underlying trend within a grid trading system.

For long and short grids, you can choose whether or not to open the initial position during grid creation. If you choose to open an initial position, a long position will be opened on long grid and a short position on the short grid. The neutral grid does not initially open positions.

How can having an initial position affect your long/short grid?

  • When you have an initial position opened: If the direction of the market is accurate based on the grid opened, you can potentially make more profits. However, if the market goes in the opposite direction, you can also potentially include more losses. The long and short grid does not initially hold a position, so it does not have this feature.

When you don’t have an initial position opened: In this case, the set up will be similar to a neutral grid. Neutral grids may buy first and then sell, or sell first and then buy, depending on the market trend. On the other hand, the long grid will buy first before selling, while the short grid will sell first before buying.

How to set up a Futures Grid Trading Bot?

The grid trading bot systematically executes buy- and sell-limit orders based on the parameters you set. Here’s how you can set up your first long/short grid trading bot.

1. Log in to your Binance account and go to [Derivatives] - [Binance Futures Overview]. Click [Trading Bots] - [Futures Grid].

You can also access the Futures Grid Trading interface from the Binance Futures homepage by clicking [Trading Bots] - [Futures Grid].

If you’re using the Binance App, go to [Futures] - [USDⓈ-M Futures] or [COIN-M Futures]. Select a trading pair and tap [Grid] at the bottom left.

2. The first parameter you must select is the contract on which the trading bot will be deployed. In this example, we will be using the BTCUSDT perpetual contract.

3. Enter the parameters of your long/short grid trading bot on the grid trading panel. The key parameters that you must include are:

  • The upper and the lower boundaries of the price range;
  • The number of orders to be placed within the configured price range;
  • The width between each grid order;
  • Initial margin.

If the current market price exceeds the grid trading range, the Futures Grid Trading Bot will start without any position.

4. Assign the initial margin of the position. The system will calculate your initial margin value based on the number of grids, leverage, and price range you set. Note that the denser the grid, the greater the corresponding initial margin.

Please note that the notional value of each grid order must meet the minimum requirement. You can reduce the number of grids or increase the initial margin to ensure that each grid’s minimum notional value is met.

Insufficient Initial Margin Reminder

When the initial margin is lower than the minimum requirement, you will be notified to meet the minimum initial margin required to activate the grid trading bot.

Please ensure that your margin balance is higher than the maintenance margin to avoid liquidation.

5. Click [Create] to place your grid order.

Advanced Settings

Trigger Price

The grid trading bot also comes with enhanced functions that enable you to manage your positions and risk better. One of which is the trigger price. The trigger price is a predetermined price level at which the grid trading bot will be activated. This allows you to dictate when the system will be active when market conditions meet your criteria.

When a grid trade is triggered, the system divides the asset price range into several grid levels according to your parameters and sets pending orders for each price level. When the asset’s price falls, a buy order is executed, and a sell order is placed immediately at a high price. When the price rises, a buy order is placed directly at a lower price as soon as a sell order is executed. This bot sets you up to buy low and sell high, allowing you to profit in volatile market conditions.

Stop-Loss

Additionally, you can set a stop-loss for your grid positions. Once the asset’s price crosses below or above the stop loss range, your entire grid position will be closed. This feature protects your position from incurring outsized losses when the market behaves unfavorably.

You can also set whether or not you want to keep the position open when the grid stop-loss triggers the termination.

Open a Position on Creation

If you enable [Open a position on creation], the system will automatically open position at market price when the grid is created; when disabled, the system will not open position for you after the grid is created. This feature is only for non-trailing grids.

To monitor trading activity, click the [Running] tab to find grid trading details.

To end the grid trading system, click [End].

USDⓈ-M Futures Short Grid Example

Consider a short grid bot with a configured price range between 9,800 USDT to 10,200 USDT and a grid quantity of 4.

Assuming that the quantity of sell-limit orders at each price is 1, and the market price (the latest transaction price) is 10,010 USDT.

With an initial position opened:

The following scenario shows how a short grid with an initial position will be activated.

PriceDirection
10,200 USDTSell
10,100 USDTSell
10,000 USDTSell
9,900 USDTSell
9,800 USDTSell (not activated)

In this case, the lowest sell-limit order (9,800 USDT) is excluded, and the subsequent sell orders are placed upwards from 9,900 USDT to 10,200 USDT. If the initial position is transacted between the prices of 9,900 USDT and 10,000 USDT, the initial number of grid orders will be 2.

Since the current market price is 10,010 USDT, the sell orders at the prices of 9,900 USDT and 10,000 USDT will be filled as the initial position. Once the initial position is filled, a buy order will be placed at the next lower price. The grid limit orders will be updated as follows:

PriceDirection
10,200 USDTSell
10,100 USDTSell
10,000 USDT-
9,900 USDTBuy
9,800 USDTBuy

To summarize, for short grid bots with an initial position, the first sell-limit order will trigger the initial short position. Simultaneously, the subsequent sell-limit orders will be populated in ascending order toward the highest boundary of your configured grid. Then, the buy-limit orders will be placed in the market once the initial short position is triggered, according to your bot’s parameters.

Similarly, long grid trading bots will be activated once the first buy-limit order is filled. Subsequently, all grid orders will be populated.

With no initial position opened:

The following scenario shows how a short grid without an initial position will be activated.

PriceDirection
10,200 USDTSell
10,100 USDTSell
10,000 USDT-
9,900 USDT-
9800 USDT-

In this case, since the current market price is 10,010 USDT, only the 2 sell orders above the market prices of 10,200 USDT and 10,100 USDT will be placed and no buy orders will be placed, so there is no initial position opened.
If the market moves up to 10,110, the sell order at the 10,100 price will be filled, and a short position is opened. The grid limit orders will be updated as follows:

PriceDirection
10,200 USDTSell
10,100 USDT-
10,000 USDTBuy
9,900 USDT-
9800 USDT-

In summary, when creating a short grid and choosing not to open an initial position, the initial pending order may be less than the total number of grids, and only sell orders will be placed above the market price.

The logic of the long grid is similar, only buy orders below the market price will be placed initially.

Notes:

  1. The initial pending orders of the grid are less than the total number of grids, and all pending orders cannot be viewed;
  2. If the market fluctuates in the opposite direction, you may miss the market due to not opening a position at the beginning.