> For the complete documentation index, see [llms.txt](https://docs.itradingbot.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.itradingbot.net/en/bybit-robot/bybit-task-parameters-and-order-grid-calculation.md).

# Bybit: task parameters and order grid calculation

<mark style="color:$tint;">In the constructor of a typical Bybit robot, you can check the volume of orders, the distance between them and the calculation of the need for funds before creating a task. The sequence of saving and running is described in the article Bybit: first task and run. —</mark> [<mark style="color:$tint;">Bybit: first task and launch</mark>](/en/bybit-robot/bybit-first-task-and-launch.md)

### First order and leverage

<mark style="color:$tint;">The order volume is the first order volume in USDT. It's not the size of the entire grid: safety orders add to it individual volumes.</mark>

<mark style="color:$tint;">The</mark> <mark style="color:$tint;">**Leverage**</mark> <mark style="color:$tint;">affects the margin and the allowable position. The leverage increase alone does not increase the volume of the first order. The range available depends on the trading pair.</mark>

<mark style="color:$tint;">Check out</mark> <mark style="color:$tint;">**The strategy**</mark><mark style="color:$tint;">:</mark> <mark style="color:$tint;">**Long**</mark> <mark style="color:$tint;">or Short. The direction affects the location of the safety orders and exit levels.</mark>

### The safety orders

<mark style="color:$tint;">The number of safety orders sets the number of additional orders in the grid. At zero, the form removes the associated averaging fields from the species.</mark>

<mark style="color:$tint;">The number of active safety orders determines how many such orders can be issued at a time. That number can't be more than the total number of safety orders. In the Exchange Account, the robot holds the remaining orders in a queue and displays them as the space is cleared.</mark>

<mark style="color:$tint;">The price dynamic step is the coefficient of change of distance for the next steps. The value</mark> <mark style="color:$tint;">**1**</mark> <mark style="color:$tint;">maintains the same increment of the step.</mark>

<mark style="color:$tint;">Martingale sets the coefficient of change in the size of the next safety orders. After rounding the number of exchanges by step, the result can be different from a simple multiplication. If rounding doesn't increase the order, the selection table shows a warning.</mark>

### Exit from position

<mark style="color:$tint;">In the</mark> <mark style="color:$tint;">**Profit mode**</mark> <mark style="color:$tint;">field, select</mark> <mark style="color:$tint;">**Take Profit**</mark> <mark style="color:$tint;">or</mark> <mark style="color:$tint;">**Without Take Profit**</mark><mark style="color:$tint;">. In the second case, such a closing limit order is not issued; the exit depends on other configured conditions or individual user action.</mark>

<mark style="color:$tint;">For Take Profit, please indicate a positive percentage. In Exchange Account, the level is calculated from the average price of the current position: higher for the long and lower for the short.</mark>

<mark style="color:$tint;">**SM, % (from the entry point)**</mark> <mark style="color:$tint;">sets the deviation for the stop-market. His calculation is based on the price of the first order. In Exchange Account, the field is opened by the Stop-market switch. After activation, the closing is executed by a market order, so the actual price may differ from the stop level.</mark>

**Break-even stop** <mark style="color:$tint;">is available only to a Bybit exchange-broker subaccount robot, shown as</mark> **Exchange Account** <mark style="color:$tint;">in the panel. Legacy Bybit API connections (Old Grid / API broker) do not support it. Fill both fields:</mark>

* **BE trigger, %** <mark style="color:$tint;">— favorable price movement from the current average position price that activates protection.</mark>
* **BE stop level, %** <mark style="color:$tint;">— stop placement from the same average: above it for a long and below it for a short.</mark>

<mark style="color:$tint;">Trigger must be greater than 0; level must be at least 0 and strictly lower than trigger. Averaging changes the average price and recalculates the BE levels. A 0% level does not guarantee a zero result because of fees and execution. Edited values apply from the next trading cycle; the current cycle keeps its previous values. Any user can test a BE strategy in the Backtester by selecting BYBIT. See</mark> [Break-even stop](/en/tools/calculations-and-verification/break-even-stop.md)<mark style="color:$tint;">.</mark>

<mark style="color:$tint;">The signal, the cycles and the deviation are related to the conditions of the task. They are not lost in the following grid calculations.</mark>

### Open the grid account

1. <mark style="color:$tint;">In the Bybit robot constructor, select pairs and fill in the task settings. —</mark> [<mark style="color:$tint;">The Bybit robot designer</mark>](https://app.itradingbot.net/bybit-robot)
2. <mark style="color:$tint;">Look at the selected tool tables. It shows the current price, price and quantity steps, order limits and leverage data.</mark>
3. <mark style="color:$tint;">Open the calculation in</mark> <mark style="color:$tint;">**The grid**</mark> <mark style="color:$tint;">column of the tool you need. If the reason for the refusal is given instead, check the parameters or filters first.</mark>

<mark style="color:$tint;">The first and safety orders are listed in the window: prices, amount of assets, volume and accumulated volume. The results show the average price, net assets, hedge reserves and liquidation estimates for different margin regimes.</mark>

<mark style="color:$tint;">The calculation includes the entire grid of safety orders, even if only a few of them are issued at the same time. The net assets have their own margin and leverage position volume.</mark>

<figure><img src="https://1830394604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6lHX8ZJXkBHNJALLsrDj%2Fuploads%2F908v0T4Kt3e69bZp4qCm%2Fvisual-pass-20260914-bybit-grid.jpg?alt=media" alt="A demonstration of the grid calculation BybitThe price, quantity and volume of orders, average price and own funds."><figcaption><p>A demonstration of the grid calculation BybitThe price, quantity and volume of orders, average price and own funds.</p></figcaption></figure>

### Share of funds and reserves under hedge

<mark style="color:$tint;">To take the deposit into account along with the My funds field, % filters the instruments by the specified percentage of the USDT balance. This share refers to one position of the entire grid and hedge reserve. It doesn't automatically distribute between all the selected tasks.</mark>

<mark style="color:$tint;">In Exchange Account, the calculation takes USDT from the UNIFIED wallet, without funds for FUND. When you connect your account through the API, you use the wallet balance USDT that you receive from the robot. The calculation does not deduct the funds from open positions and orders, so check the actual free margin separately.</mark>

<mark style="color:$tint;">Hedge reserve, % adds to the reserve account under the counter position. These fields do not translate anything and do not reserve on the exchange, do not open a hedge and do not change the volume of the first order of the saved task.</mark>

<mark style="color:$tint;">The check on the funds share is active when the switch is on, the balance is known and the share is greater than zero. If the funds are not available, the absence of a calculation error does not confirm that the funds are sufficient.</mark>

<mark style="color:$tint;">The</mark> <mark style="color:$tint;">**Deposit**</mark> <mark style="color:$tint;">field in the Grid window itself allows you to recalculate this example for another amount. The change is in the window calculation.</mark>

### Selection of tools and leverage levels

<mark style="color:$tint;">The filters below the table allow you to take into account the daily volume of trades, the volume on the selected leverage, the listing period and the size of the price step.</mark> <mark style="color:$tint;">**Spot Bybit**</mark> <mark style="color:$tint;">and Spot Binance markers check for the presence of the instrument on the spot of the relevant exchange; they do not translate this robot into spot trading.</mark>

<mark style="color:$tint;">The</mark> <mark style="color:$tint;">**Maximum leverage**</mark> <mark style="color:$tint;">picks up each instrument's leverage, taking into account the size of its net and the hedge stock. When you create a task, you send the value selected for that pair. If it's not picked, the</mark> <mark style="color:$tint;">**Leverage**</mark> <mark style="color:$tint;">field is used, so it's still mandatory. Check the final values before you save them.</mark>

<mark style="color:$tint;">**Delete with errors**</mark> <mark style="color:$tint;">removes the selection from the tools that have the table showing the reasons for the failure. This button works with the list of tasks created and does not delete the robot's existing tasks.</mark>

### How to Understand the Results

<mark style="color:$tint;">The calculation is based on the current mark price and the form parameters. It helps to verify the grid device, but it doesn't reproduce the trading on the history. The real net depends on the price of the first order and the rounding rules.</mark>

<mark style="color:$tint;">Bybit's current calculation does not include commissions and funding: exit performance at exit levels cannot be considered net profit. The liquidation price is also a simplified model. For the actual position, check the exchange and terminal data.</mark>

<mark style="color:$tint;">The warning can be the order volume, leverage, number step or filter selected. The absence of warnings does not guarantee the receipt and execution of all orders. Opening a calculation doesn't create a task and it doesn't start a trade.</mark>
