Max Open Volume

The Max Open Volume feature caps the total volume of all open positions combined. It stops adding volume once the limit is reached.

The feature is designed as a safety guard for strategies that build exposure over time, such as Martingale, adding, and grid strategies.

What the feature is for

Use this feature when a strategy can scale up its volume. Max Open Volume caps how far the total exposure can grow, protecting the account from runaway position sizes.

How the limit works

When enabled, the strategy stops adding volume once the total open volume reaches the configured maximum.

The max open volume unit is the same as the Entry amount unit. Configure the Entry amount first so the volume limit is interpreted in the correct unit. For fixed units the backtester converts the limit to lots at compile time. With Equity percent or Progressive lots, it recalculates the cap from current equity and the fill/check price, including floating profit/loss; the form bounds remain an initial-account preview.

The field follows the Entry unit and the loaded market: its minimum and maximum are the market's minimum and maximum lot converted into the Entry unit. Lots keep the volume the engines trade; the money units (Amount, Value, Margin) keep the entered whole number stepped by 1, and Equity percent keeps two decimals, exactly like the Entry amount field. The backtester and the MQL5 expert round the capped lots to the lot step. A cap that converts outside the market's volume range (for example after the Entry unit or the market changed) does not bind in either engine: the limit is ignored rather than clamped. A Progressive lots cap is a lot size per account step like the Entry amount itself, so it grows with the account and is capped on the market's volume grid instead. Without a loaded market the generic limits apply: 0.01 to 100,000,000 in the Entry unit.

When you change the Entry unit, the cap is reset to the current Entry amount — the smallest cap that still lets an entry open — because the stored number would otherwise silently mean a different size in the new unit.

The cap is compared with the Entry amount at the unit's display precision, so a cap equal to the Entry amount never reports an error.

The cap also limits Martingale scaling: a scaled-up entry is clamped to the cap, and Add on Same Signal or Grid averaging-down fills are skipped when they would exceed it.

Restrictions

  • The Max open volume must be at least as high as the Entry amount. If the maximum is lower than the entry amount, an error is shown in the feature list, because a single entry would already exceed the volume limit.

Feature warnings

The feature list shows a warning when the limit cannot have any effect:

  • The total volume can only grow beyond the Entry amount when Add on Same Signal adds volume, when Grid Averaging Down opens grid positions, or when Martingale scales entries up. Without any of them, the Max open volume limit is unnecessary: the feature list shows the warning '"Max open volume" is unnecessary without "Adding", "Grid", or "Martingale"' and the Max open volume record is marked with "(Unnecessary)".

Form fields

  • Max open volume: the maximum total volume of all open positions combined, in the Entry unit. The minimum and maximum follow the market's lot limits converted into the Entry unit (Fixed lots keep the traded volume, money units step by 1); without a loaded market the field accepts 0.01 to 100,000,000.