# Contract Grid

### **What is a Contract Grid Strategy?**

A **Contract Grid** strategy is an automated trading method that profits from market volatility by **buying low and selling high** within a preset price range. Users define:

* **Price range** (upper and lower bounds)
* **Number of grids**
* **Quantity per trade**

The system then calculates price levels for each grid and automatically executes buy or sell orders as the market moves. The goal is to capture profits from every price swing between the grid levels.

### **Three Types of Contract Grid Strategies**

#### 1. **Long Grid**

Used when you expect prices to fluctuate upward:

* Buy when the price falls to a lower grid level.
* Sell at the next higher grid level.

#### 2. **Short Grid**

Used when expecting a fluctuating downward trend:

* Sell when the price rises to a higher grid level.
* Buy back at the next lower grid level.

#### 3. **Neutral Grid**

Used when expecting sideways movement:

* Sells (opens short/closes long) above the initial market price.
* Buys (opens long/closes short) below the initial market price.
* No positions are held when the grid starts.

### **Example: Neutral Grid on BTCUSDT**

**Settings:**

* Grid Range: 40,000 – 60,000 USDT
* Number of Grids: 5 (Arithmetic)
* Quantity per Trade: 0.001 BTC

**Calculated Grid Levels:**

* 60,000 (Sell)
* 56,000 (Sell)
* 52,000 (Sell)
* 48,000 (Buy)
* 44,000 (Buy)
* 40,000 (Buy)

If the price drops to **$47,000, the $48,000 buy order is filled, and a long position of 0.001 BTC is established**.

### **How to Set Up a Grid Strategy**

#### **Platform Navigation**

* **Web**: Go to **Futures → Contract Grid**
* **App**: Navigate via **More → Contract Grid** or **Assets → Bot Account → Create**

<figure><img src="https://1616827409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2NT5diA6akSHbeZPuDNZ%2Fuploads%2FuuysGK0FE79NhO5Ut4L2%2FFuture-grid.png?alt=media&#x26;token=afc90c5c-f4a2-4bef-bef1-9af6870f4c13" alt="" width="299"><figcaption><p>Grid Strategy</p></figcaption></figure>

### **Core Parameters**

#### **1. Margin Mode**

* All contract grid strategies use **Isolated Margin**.

#### **2. Grid Direction**

* Choose: **Long**, **Short**, or **Neutral**

> Direction **cannot be changed** after creation.

#### **3. Grid Price Limits**

* Define the **upper** and **lower** price boundaries.
* No orders will be placed if the market moves outside this range.

#### **4. Grid Types**

**Arithmetic Grid**

* Equal price intervals between grid levels.
* Formula:

$$
\text{Price Difference} = \frac{\text{Upper Limit} - \text{Lower Limit}}{\text{Number of Grids}}
$$

**Geometric Grid**

* Equal **percentage** price changes between grid levels.
* Formula:

$$
\text{Price Ratio} = \left( \frac{\text{Upper Limit}}{\text{Lower Limit}} \right)^{1/\text{Grids}}
$$

#### **5. Number of Grids**

* Minimum: **2**
* Maximum: **300**
* Must meet minimum price difference per exchange rules.

#### **6. Investment Amount**

* Set as a **percentage** of your available balance.
* Once placed, it **cannot be changed**.
* Determines the initial capital used.

**Total Investment = Investment Amount × Leverage**

#### **7. Quantity per Order**

**Neutral Grid**

$$
\text{Grids} = \text{Adjustment Factor} × \text{Investment Amount} × \text{Leverage} / \sum (\text{Grid Prices})
$$

**Long/Short Grid**

A more complex formula based on:

* Direction (1 for Long, -1 for Short)
* Margin
* Opening losses
* Mark or trigger price

> **Adjustment Factor = 0.8**

#### **8. Leverage**

* Set according to contract risk limits.

### **Profit per Grid**

#### **Arithmetic Grid**

* Profit depends on grid spacing, entry cost, and fees.
* Example:
  * Price range: 1,000–2,000
  * Grids: 10
  * Fee: 0.1%
  * **Profit Range** ≈ **5.05% to 9.79%**

#### **Geometric Grid**

* Profit depends on the compounded grid ratio.
* Example:
  * Price range: 1,000–2,000
  * Grids: 10
  * Fee: 0.1%
  * **Profit per Grid** ≈ **6.97%**

### **AI-Based Grid Parameters (Neutral Only)**

* Go to the **\[AI]** tab to check the recommended parameters and enter your investment amount.
* Once you've decided on the amount of margin you want to allocate to your grid trading strategy, click' Create' and confirm your grid order so that the system automatically places buy or sell orders at the preset prices. Please note that the AI-based parameters are set in a Neutral direction and in Arithmetic Mode by default.

<figure><img src="https://1616827409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2NT5diA6akSHbeZPuDNZ%2Fuploads%2FDAKmG3suG4tJf6fNxsJl%2FFuture-AI.png?alt=media&#x26;token=4528a3af-24b5-4898-aadb-f5ba6e392933" alt=""><figcaption><p>AI-Based Grid Parameters</p></figcaption></figure>

#### **How AI Parameters Are Calculated**

**Price Bands**

$$
\text{Upper Band} = \text{MA} + \text{BBM} × \text{Std Dev}
$$

**Grid Count**

$$
\text{Grid Count} = (1 + \text{Buffer}) × \frac{\text{Upper} - \text{Lower}}{\text{ATR}}
$$

* **Buffer** = 20%
* **ATR Period** depends on the term (7, 30, or 180 days)

***

### **Advanced Options**

* **Trigger Price**: Grid only activates when this price is reached.
* **Stop Price**: The grid stops if the price hits this level.
* **Liquidate All on Stop**: Closes all open positions at the market price when the stop is triggered.

***

### **Grid Termination Conditions**

* Manually terminated by user
* Market hits the stop price
* Insufficient margin
* Position is forcibly liquidated or ADL-triggered
* Order limit reached or exceeded

***

### **Troubleshooting Grid Failures**

Grid setup may fail due to:

* Too many grids (max: 10 active contract grids)
* Order size exceeds limits
* Position amount exceeds contract limits
* The order quantity exceeds platform thresholds

***

### **Monitoring Grid Performance**

To view running or past grids:

* Click **"Details"** in the orders panel to access performance history and strategy insights.

<figure><img src="https://1616827409-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2NT5diA6akSHbeZPuDNZ%2Fuploads%2FqzxIoshmy25yv3j8e4yi%2FFuture-grid-detail.png?alt=media&#x26;token=b588ad04-dc87-443b-8c40-cf4bdad3e04d" alt=""><figcaption><p>Monitoring Grid Performance</p></figcaption></figure>
