Max total margin: how much of the deposit can be in use at once
Updated:
Max total margin, as a percent of deposit, sets a ceiling on the combined margin tied up in all open trades at once. If a new trade together with the already open ones would exceed that ceiling, the Snapback bot does not open it.
What it means in plain words
Each trade "freezes" part of your account as margin. When several trades are open, the frozen amounts add up. The setting limits what share of the account may be frozen in total. The rest stays free.
Why it exists
It is insurance against the case when many pumps coincide in time. Even if each trade is small on its own, their sum can take up almost the whole account. The margin ceiling leaves a reserve that is not tied to any trade.
How it works in the code
Before opening a trade, the bot calculates:
- margin already in use: the sum of planned margin across all open positions of your account (all bots together);
- the desired margin of the new trade: deposit x entry size percentage / 100;
- the ceiling: deposit x this setting's percentage / 100.
If "already in use + new" is more than the ceiling, the signal is rejected with the reason "total margin cap reached". The deposit is the account's current balance at the moment of the check.
Illustration of the mechanism only, not advice: deposit 1000 USDT, ceiling 40% (400 USDT), the new trade needs 20 USDT. If 390 USDT is already in use, the sum of 410 exceeds 400 and the trade does not open. If 380 is in use, the sum of 400 does not exceed the ceiling and the trade opens.
Allowed values and defaults
In the configuration, a number above 0 and up to 100 inclusive, with a default of 40. In the wizard from 1 to 100.
What happens if it is higher or lower
- Higher ceiling: a bigger share of the account can be in use at once, and less free reserve remains.
- Lower ceiling: the bot rejects new trades more often, but more of the deposit stays outside positions.
The ceiling is calculated from margin, not from position size. With leverage the positions are larger than the margin by the same factor, so even a small margin can mean large positions.
How it connects to other settings
- Max simultaneous positions: a limit by count, while this one is by money.
- Entry size: how much margin each trade takes.
- Leverage: multiplies margin into position value.
Common mistakes
- Confusing margin with position value: the limit applies to margin.
- Expecting the ceiling to limit only one bot: all open positions of the account are counted.
- Setting a ceiling smaller than the entry size of one trade: the bot then opens none.
Where to find it in the bot wizard
The "New bot" or "Edit" form, the "Safeguards" block, the "Max total margin, % of deposit" field.
Frequently asked questions
What is max total margin?
It is a ceiling, as a percentage of the deposit, for the sum of margin across all open trades. If a new trade would exceed it, the bot does not open it.
What are the default and the limits?
The default is 40%. In the configuration more than 0 and up to 100; in the wizard from 1 to 100.
How is it different from max simultaneous positions?
Max positions limits the number of trades, while total margin limits the amount of money. Either of the two limits can trigger.
Are the trades of my other bots counted?
Yes. The count includes all open positions on your account, not just the current bot's.