How to Use the Trailing Up and Trailing Down Functions in USDⓈ-M Futures Grid Trading?
How to Use the Trailing Up and Trailing Down Functions in USDⓈ-M Futures Grid Trading?
2024-03-05 02:59
Disclaimer: In compliance with MiCA requirements, unauthorized stablecoins are subject to certain restrictions for EEA users. For more information, please click here.
What are the trailing up and trailing down functions in USDⓈ-M Futures grid trading?
The trailing up function allows your USDⓈ-M Futures grid bot to adjust the trading range upwards to align with an upward-trend market, while the trailing down function moves the trading range downwards to align with a downward-trend market. These settings can address the limitations of traditional grid trading, where profits are often limited due to price breakthroughs.
When you enable the trailing up or down functions, your grid order’s upper and lower limits will automatically adjust as the asset's price rises or falls. This feature can potentially secure higher profits by taking advantage of price movements beyond the grid’s original range.
Note: To use the trailing down feature on the app, please upgrade to version 2.86.0 or above.
Only [Trailing Up] enabled
Only [Trailing Down] enabled
Both [Trailing Up] and [Trailing Down] enabled
Please note:
Once trailing up or trailing down is enabled, you cannot disable it during the current grid operation.
When only [Trailing Up] is enabled, the stop loss price for the long grid and the stop bottom price for the neutral grid will automatically trail up with the grid's lower price. These settings cannot be adjusted once set.
When only [Trailing Down] is enabled, the stop loss price for the short grid and the stop top price for the neutral grid will automatically trail down with the grid's lower price. These settings cannot be adjusted once set.
If both [Trailing Up] and [Trailing Down] are enabled at the same time, the stop trigger price of the USDT-Margined futures grid will not be trailed.
You are required to set a trailing up/down limit to enable these functions.
How to enable trailing up or trailing down?
1. You can activate trailing up or trailing down when placing a grid trading order. Simply check the box next to [Trailing Up] or [Trailing Down] to enable the feature.
2. Once [Trailing Up] is checked, you will need to set a trailing up limit price, which determines when the grid would stop moving up. The trailing up limit price should be higher than the Upper Price, and lower than the Trailing Cap Price and Stop Top Price for the neutral grid, Take Profit Price for the long grid, and Stop Loss Price for the short grid (if any).
Similarly, when [Trailing Down] is checked, you will need to set a trailing down limit price, which determines when the grid would stop moving down. The trailing down limit should be lower than the Lower Price when Trailing Down is enabled. The trailing down limit price should be higher than the Stop Bottom Price for the neutral grid, Stop Loss Price for the long grid, and Take Profit Price for the short grid (if any).
Based on your settings, you will see the corresponding trailing tag on the confirmation pop-up and order details page: [Trailing Up] if only trailing up is enabled, [Trailing Down] if only trailing down is enabled, and [Trailing] if both trailing up and trailing down are enabled.
How to monitor trailing orders?
You can monitor your trailing orders from [Running] and [History] tabs.
1. [Running]
You can view real-time data on all your active orders, including trailing up and trailing down orders. You may also adjust your order parameters here.
To view the grid parameters after each trailing, go to [Running /History Order Details] - [History] - [Trailing Records].
2. [History]
You can view a complete record of all your past orders. You may also check the performance of your completed trailing up and trailing down orders.
How to use the trailing functions in grid trading?
Let's use the below example to understand how trailing up and trailing down functions work in grid trading.
Parameters
Direction: Neutral
Lower limit price: $25,000
Upper limit price: $45,000
Trailing up limit: $54,000
Trailing down limit: $20,000
Number of grids: 5
Grid mode: Arithmetic
Leverage: 5x
Last price: $30,000
Min. quantity: 0.001
Min. notional: 5
Trailing coefficient: 2
Adjust coefficient: 0.95
Maximum price for this symbol: $4,529,764
Initial margin (set by the user): 500
Grid trading without using trailing up:
Initially, 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 evenly distributed across the grid based on the price gap.
Price
Order
$45,000
Sell
$41,000
Sell
$37,000
Sell
$33,000
Sell
$29,000
None
$25,000
Buy
If the price rises above the upper limit price or falls below the lower limit price, 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 or wait for the price to rise and fulfill the existing sell orders to pair with the buy orders.
Grid trading using trailing up and trailing down:
Trailing up: Adjusts the trading range upwards in response to significant price increases.
Trailing down: Adjusts the trading range downwards in response to significant price decreases.
Example with trailing up:
If the price rises 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.
If the price keeps increasing 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.
Example with trailing down:
Conversely, if the price falls below the lower limit price, and the price difference between the grid levels ($33,000 - $4,000 = $29,000), the bot will adjust the grid downwards:
It will cancel the highest sell order and place a new sell order at the previous lower limit price.
If the price keeps decreasing below the new lower limit price and the price difference ($29,000 - $4,000 = $25,000), the bot will repeat this process and adjust the grid downwards.
Originally, 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 original buy order and place a new buy order at the old upper limit price ($45,000).
If the price keeps going up 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. The bot will perform like a normal grid bot if the price remains in this range. If the price keeps going up above the new upper limit price and the price gap ($53,000 + $4,000 = $57,000), the bot won’t move up, because the trailing up limit is $54,000.
In this example, the trailing up count is 2.
If at this point the price starts to fall below the lower limit price and the price gap ($33,000 - $4,000 = $29,000), the bot will move the price range down by canceling the original sell order and place a new sell order at the old lower limit price ($33,000).
If the price keeps going down below the new lower limit price and the price gap ($25,000 - $4,000 = $21,000), the bot will move the price range down again by canceling the sell order from the upper limit price ($45,000), and placing a new sell order at the old lower limit price ($25,000).
The new price range now becomes $21,000 to $41,000. The bot will perform like a normal grid bot if the price remains in this range. If the price keeps going down below the new lower limit price and the price gap ($21,000 - $4,000 = $17,000), the bot won’t move down, because the trailing down limit is $20,000.
In this example, the trailing down count is 3.
Why can trailing lead to the creation of reverse positions for long and short grids ?
When using the Trailing Down feature for long grids or the trailing up feature for short grids, it's important to understand that these functions operate counter to the grid's original direction. This can result in the creation of reverse positions, which may not align with your initial trading strategy.
1. Impact on long grids (Trailing down enabled)
Scenario: In a continuous downtrend, enabling the trailing down function for a long grid can lead to the creation of short positions.
Mechanism: As the market price drops, the entire grid adjusts downward. Since the trailing down feature keeps the quote amount for each grid order, meaning more of the base asset is sold as prices decline. This increased selling pressure within the adjusted price range can lead to the formation of short positions, even though the grid was initially set up to take long positions.
2. Impact on short grids (Trailing up enabled)
Scenario: In a continuous uptrend, enabling the trailing up function for a short grid can result in the creation of long positions.
Mechanism: As the market price rises, the grid adjusts upwards. The trailing up feature ensures that the quote amount per grid order remains constant, resulting in the purchase of more of the base asset as prices rise. This accumulation within the new price range can lead to the formation of long positions, contrary to the original short strategy.
How to calculate the quantity in trailing functions?
In a trailing up or down grid trading strategy, each grid maintains the same quote value, rather than the base quantity, due to the fluctuating price range. While in traditional grid trading, each grid usually has the same amount of the base currency (e.g., BTC in a BTC/USDT perpetual contract) regardless of the grid’s price level.
1. Grid quantity per order in quote asset The average cost ratio, which accounts for any open loss for each order, is used to calculate the quantity for each grid.
The formula for calculating the trailing grid quantity in quote is as follows:
If a trigger price has been set, the mark_price should be changed to this trigger price. The "assuming price" is the expected execution price for a buy or sell order in the context of a trailing up grid trading strategy. This assuming price is used to adjust the order quantities to maintain a constant quote value across each grid.
Please note:
The price range in a trailing up or trailing down strategy is not fixed. As the asset price rises or falls, the bot adjusts the price grid upwards or downwards, canceling lower buy orders and placing new ones at higher prices, or canceling higher sell orders and placing new ones at lower prices. By ensuring each grid holds the same quote value, the bot can maintain a consistent investment size across changing price levels, allowing for more efficient use of capital and enabling the grid to follow upward and downward movements in a rising market.
Example: Assume that each grid should hold a value of $300. If the price of BTC is $30,000, you would buy/sell 0.01 BTC per order. However, if the price rises to $33,000, you would adjust the quantity to approximately 0.00909 BTC so that the quote value remains at $300.
Using the parameters from the above section, the formula for calculating the grid quantity in the quote asset is:
The minimum initial margin is calculated similarly to the general guidelines. First, the smallest quantity (min_qty) that the bot can trade is calculated, and then it is used it to calculate the minimum initial margin: