FAQ
Home
Support Center
FAQ
Trading Bots
Spot Grid Bot
How to Use the Trailing Up Function in Spot Grid Trading?

How to Use the Trailing Up Function in Spot Grid Trading?

2023-09-25 05:06

What is the Trailing Up function?

The Trailing Up function enables your Spot Grid to move the trading range upwards to align with an upward trend market. It aims to address the limitations of traditional grid trading where profits are often limited due to price breakthroughs.
After enabling Trailing Up, your grid order’s upper and lower limits will automatically adjust as the asset's price increases. It potentially allows you to secure higher profits by taking advantage of price increases beyond the highest range of the grid.

How does Trailing Up work?

Let’s use the following parameters to illustrate how the Trailing Up function works.
Parameters
  • Lower limit price: $25,000
  • Upper limit price: $45,000
  • Number of grids: 5
  • Grid mode: Arithmetic
  • Last price: $30,000
  • Min. quantity: 0.00001
  • Min. notional: 10
  • Trailing coefficient: 2
  • Max. price for this pair: $99,999
  • Investment amount (set by the user): $1,500
Grid trading without Trailing Up:
First, the bot will set up a grid trading structure with a buy order at the lower limit price ($25,000) and multiple sell orders from $33,000 to $45,000 spread equally across the grid based on the price gap.
If the price rises above the upper limit price ($45,000), the bot won’t place any new orders. It will wait for the price to drop and fulfill the existing buy orders to pair with the sell orders.
Grid trading using Trailing Up:
The Trailing Up function adjusts the trading range in response to significant price increases. If the price increases above the upper limit price and the price difference between the grid levels ($45,000 + $4,000 = $49,000), the bot will adjust the grid upwards.
It will cancel the lowest buy order and place a new buy order at the previous upper limit price ($45,000). If the price keeps going above the new upper limit price and the price difference ($49,000 + $4,000 = $53,000), the bot will repeat this process and adjust the grid upwards.
  • Initially, the bot placed a buy order at $25,000 and a series of sell orders from $33,000 to $45,000 based on the price gap.
  • If the price goes above the upper limit price and the price gap ($45,000 + $4,000 = $49,000), the bot will move the price range up by canceling the initial buy order ($25,000) and place a new buy order at the old upper limit price ($45,000).
  • If the price keeps going above the new upper limit price and the price gap ($49,000 + $4,000 = $53,000), the bot will move the price range up again by canceling the buy order from the lower limit price ($29,000) and placing a new buy order at the old upper limit price ($49,000).
  • The new price range now becomes $33,000 to $53,000. If the price remains in this range, the bot will perform like a normal grid bot.
  • In this example, the Trailing Up counts is 2.

Understanding quantity calculation for grid trading in the Trailing Up mode

In a Trailing Up grid trading strategy, each grid holds the same quote value, not base quantity, due to the fluctuating price range. While in traditional grid trading, each grid usually has the same amount of the base currency (BTC in a BTC/USDT trading pair) regardless of the grid’s price level. For example, you might buy or sell 0.01 BTC at each grid level, it doesn’t matter whether the price is $30,000 or $35,000.
1. Grid quantity in quote
grid_qty in quote = (initial_value (1 - buffer1) - max(1.5 * buffer2 * min_notional, 1.5 * min_qty * last_price, 3 * tmp_trading_fee)) / (grid_count + 1)
Where:
  • initial_value = Your investment amount
  • buffer1 = 0.05
  • buffer2 = 1.2
  • min_notional: Please refer to the Trading Rules
  • min_qty: Please refer to the Trading Rules
  • tmp_trading_fee = 0.001
  • grid_count = Number of grids you set
2. Example
Due to the precision of quantity, the value per grid is not exactly the same. For example, assume that each grid should hold a value of $300. If the price of BTC is $37,000, you would buy/sell 0.0081 BTC per order, so the value actually is $299.70. However, if the price rises to $41,000, you would adjust the quantity to approximately 0.00731 BTC, and the quote value would be $299.71.
The price range in a Trailing Up grid is not fixed. As the price of the asset rises, the bot adjusts the price grid upwards, canceling lower buy orders and placing new ones at higher prices.
3. Minimum investment
min_investment = (max((grid_count + 1) * min_notional * notional buffer, (grid_count + 1) * trailing_coef * initial_grid_upper_limit * min_qty)) + max(1.5 * buffer2 * min_notional * notional buffer, 1.5 * min_qty * last price, 3 * tmp_trading_fee) ) / (1 - buffer1)
Where:
  • grid_count = Number of grids you set
  • min_notional: Please refer to the Trading Rules
  • notional buffer = 1.1
  • trailing_coef = 2
  • initial_grid_upper_limit: The initial upper limit price you set
  • min_qty: Please refer to the Trading Rules
  • buffer1 = 0.05
  • buffer2 = 1.2
  • min_qty: Please refer to the Trading Rules
  • tmp_trading_fee = 0.001
4. Trailing cap price
Trailing cap price refers to the maximum price at which the bot will stop adjusting the price grid upwards.
First, calculate the estimated maximum price the bot can handle:
Estimated_trailing_cap= Min(grid value/min_qty, maxPrice)
Then, calculate the maximum Trailing Up count:
Max Trailing Up Count = (Estimated_trailing_cap - Initial upper limit)/price difference
Trailing Cap Price = Initial upper limit + price difference * max trailing up count
Please note that this price is for reference only. During the trailing process, if you cannot meet the min notional or min qty trading rules, trailing will stop, but the grid will still run in the new price range.

When do I use the Trailing Up function?

The Trailing Up function is suitable for rising markets. It enables you to capture opportunities and adapt your trading strategy in changing market conditions.
For example, when the market exhibits a strong upward trend, you can activate the Trailing Up function to automatically extend your grids upward as price increases. It potentially allows you to capitalize on the upward momentum and optimize your growth potential at each grid level.

How to use Trailing Up in the Spot Grid Trading Bot?

1. Create a spot grid: Under the [Advanced (Optional)] section, check the box next to [Trailing Up]. You’ll see the estimated Trailing Up price.
Please note that you cannot change the Stop Loss price once it has been set.
2. You’ll see [Trailing Up] on the grid order confirmation pop-up and order details page.

How to monitor my Trailing Up orders?

You can monitor your Trailing Up orders from [Running] and [History].
1. [Running]
You can view real-time data on all your active orders, including Trailing Up orders. You may also adjust your order parameters here.
2. [History]
You can view a complete record of all your past orders. You may also check the performance of your past Trailing Up orders.

Under what scenarios would Trailing Up stop running?

  • If the price touches the min. notion while Trailing up, it will stop and the grid will run in the new interval.
  • If the price touches the max. price while Trailing up, it will stop and the grid will run in the new interval.
  • If the price touches the min. quantity while Trailing up, it will stop and the grid will run in the new interval.

Can I use Trailing Up with dual tokens?

No, Spot Grid currently only supports single-token Trailing Up.