How to Calculate Leverage

Leverage in the Bot

In the bot, leverage is defined as the ratio of the maximum possible position to your deposit.

Formula: Leverage = (Order Size × Max Trigger Number) / Deposit


Example Calculation:

Let’s say your deposit is $1000, and you set the following bot parameters:

  • Order Size = $10

  • Max Trigger Number = 500

Leverage = (10 × 500) / 1000 = 5 This means the bot can build a position 5 times your deposit, i.e., 5x leverage.


Leverage on the Exchange

The leverage set in your exchange terminal defines the maximum leverage allowed for the trading pair. It’s a protective mechanism provided by the exchange.

For example, with 20x leverage and a $1000 deposit, you can open positions worth up to $20,000 using borrowed funds.


Relation to the Bot

The leverage on the exchange must be equal to or greater than the leverage calculated in the bot. If the exchange leverage is lower, the bot will stop building the position and switch to Disable-IN mode due to insufficient margin.

Proper leverage management (both in the bot and on the exchange) helps you control risk and use your funds efficiently.


Examples of Margin Usage

Example 1: Exchange Leverage = 20x

  • Deposit: 1000 USDT

  • Order Size: 10 USDT

  • Max Trigger Number: 500

  • Max Bot Position: 5000 USDT

  • Used Margin: 5000 / 20 = 250 USDT

  • Free Margin: 1000 – 250 = 750 USDT

Example 2: Exchange Leverage = 100x

  • Deposit: 1000 USDT

  • Order Size: 10 USDT

  • Max Trigger Number: 500

  • Max Bot Position: 5000 USDT

  • Used Margin: 5000 / 100 = 50 USDT

Free Margin: 1000 – 50 = 950 USDT


Leverage Limit on the Exchange

You can manually set a leverage cap on the exchange terminal as an extra layer of protection. If your bot settings require more leverage than the exchange allows, the bot will hit the limit during position building and switch to Disable-IN.

This feature helps prevent oversized or unintended positions, especially if you're not entirely confident in your bot configuration.


Recommendation: Enable Telegram Alerts

To stay informed about such situations (e.g., bot stopping due to margin limits), it’s highly recommended to enable Telegram notifications. This ensures you can quickly react and adjust your settings if necessary.

Last updated