Risk Management
Margin is the collateral you post to open and maintain a leveraged position; the initial margin is what the exchange locks when the position opens, and the maintenance margin is the minimum that must remain before the position is liquidated.
Margin decides both how large a position you can open and how much of your account is exposed to that position. On a perpetual futures venue, $100 of margin at 10x controls $1,000 of notional; the fees, funding payments and the profit or loss are all calculated on the $1,000, while the $100 is what you can lose on isolated margin before liquidation. Free margin, what is left after all open positions are funded, is what allows the next signal to be executed at all; running out of it is the most common reason a bot stops trading without any error in the strategy.
On AlgoVesta, position size for crypto bots is defined as margin per signal, so exposure per trade is fixed in your own currency and the notional follows from the leverage cap. Before an order is sent, the platform checks the exchange's minimum notional and lot step; a signal that cannot be filled at a size close to the one you requested is rejected with a message that names the nearest valid amounts, rather than being opened at a size you did not choose. The margin, leverage, notional and liquidation price of each open position are shown exactly as the exchange reports them. When the exchange rejects an order for insufficient margin, the rejection is recorded on the bot card with the exchange's own message so you can add funds or reduce size. On MetaTrader 5 the equivalent figures come from the terminal's account data. See the crypto automation page and the leverage entry.
A trader has $1,000 on a Bybit futures account and sets $100 margin per signal at 5x with a limit of five open positions. Each signal locks $100 and opens $500 of exposure. After five positions, $500 is locked and $500 remains free; the sixth signal is blocked by the position limit before margin is even checked. If a position loses $40, the account's equity drops to $960 but the initial margin of the other positions is unaffected in isolated mode.