reference · Risk & sizing

Volume-Step Rounding Validator: Min, Max and Increment

A quantity is valid only when it lies on the destination grid and within the entered minimum and maximum. The validator compares a desired amount with a chosen rounding policy and reports the residual rather than silently changing exposure.

TradeCopier Editorial TeamPublished Updated
A brass balance with differently sized stone blocks illustrating exposure and limits
Editorial illustration. Examples and calculations below state their own assumptions.

Key points

  • Round in the destination's quantity unit, not in a guessed number of decimals.
  • Validate minimum, maximum, step and grid origin together.
  • A result outside the allowed range is reported as unavailable rather than forced to a boundary.

Minimum, maximum and quantity-step validator

The starting numbers are illustrative inputs. Replace them with a consistent scenario. Calculations run in your browser; no account connection or live market data is used.

Most simple lot grids are zero-anchored. Use the documented origin for the destination instrument.

Formula and boundaries

A quantity is on the entered grid when (quantity − grid origin) ÷ step is a whole number. The selected policy uses the lower, nearest or upper grid point, then checks the entered minimum and maximum.

  • Enter constraints from the current destination instrument specification. Decimal formatting alone does not establish a valid quantity.
  • The grid origin defaults to zero. Change it only when the documented quantity grid starts from another value.
  • A grid-valid quantity can still fail account permissions, margin, aggregate limits, market state or broker acceptance.

Scope and assumptions

  • The starting example uses a zero-anchored 0.01-lot grid, minimum 0.01 lot and maximum 100 lots. Replace every field with the current destination specification.
  • The validator checks quantity arithmetic only. It does not test margin, aggregate exposure, permissions, account mode, market state or order acceptance.

Validate the complete quantity grid

The validator above tests whether (desired quantity − grid origin) ÷ step is a whole number and whether the desired quantity lies between the entered minimum and maximum. It also displays the result of the selected round-down, nearest or round-up policy. A policy result outside the entered limits is shown as unavailable instead of being forced to a boundary.

Copy the audit line into a test record with the dated destination specification. It preserves the requested quantity and every constraint used in the result. That evidence is more useful than a rounded value with no explanation of how it was produced.

A decimal result is not necessarily a valid order

A sizing formula may return 0.037 lots, but a broker can require steps of 0.01 lot. The desired quantity then falls between accepted amounts. MetaQuotes defines separate minimum, maximum, step and aggregate directional-volume properties in its symbol reference. All relevant constraints need checking.

On a simple grid of multiples of step s, rounding down a nonnegative quantity q gives floor(q ÷ s) × s. This formula assumes that grid convention; it is not a substitute for the actual platform's validation. Spotware's normalization method explicitly accepts a rounding mode.

Measure the consequence of the choice

Use a hypothetical desired quantity of 0.037 lot with a 0.01-lot increment. Suppose the planned stop-distance calculation gives $1,000 of risk per lot before execution differences and charges.

Illustrative rounding effect on quantity and planned risk
ChoiceQuantityPlanned money riskDifference from desired quantity
Unrounded target0.037$370%
Round down0.03$30−18.92%
Round up0.04$40+8.11%

The nearest allowed quantity is 0.04, yet it exceeds the assumed $37 ceiling. If the intent is never to exceed the calculated quantity, nearest rounding does not preserve that intent. The table also shows why “only one hundredth of a lot” can be a material change for a small account.

The minimum-size trap

Now suppose the calculated amount is 0.007 lot. Rounding down to the 0.01 grid gives zero, below the minimum. Automatically changing it to 0.01 increases quantity by about 42.86% relative to the target. The right response must be an explicit policy, such as skipping the trade or reviewing an instrument with a smaller permissible size.

Check the maximum and aggregate limits too. A per-order maximum and a maximum total position are different restrictions. Splitting one large request into several requests does not necessarily avoid an aggregate limit and introduces separate execution events.

Keep the residual visible

Log the calculated amount, normalization policy, final submitted quantity and accepted result. In a copying workflow, repeated small rounding differences can make an intended proportional relationship drift. Do not hide the difference by displaying only the multiplier.

For a partial close, validate both the closing quantity and any remaining position. A technically valid close size can leave a residual that the account's rules handle differently. Reconcile the final position after execution instead of assuming that subtraction alone describes the account.

Use lots and units before rounding, and margin headroom after determining the final size. The site's lot-limit guide discusses the related operational checks; no rounding formula can establish actual destination acceptance in advance.

A useful test set includes a quantity exactly on the grid, one just below the minimum, one just above the maximum and one close to a step boundary. Verify the intended policy for each case before relying on it for copied quantities.

Questions and answers

Should position size always be rounded down?

Rounding down is often appropriate when the calculated quantity is a ceiling, but it is not a universal rule for every order-management task. Closing, matching exposure and broker minimums need deliberate policies.

Why is rounding to two decimal places insufficient?

The allowed step may be 0.1, 0.25, whole contracts or a number of units. Decimal formatting does not prove that the result lies on the permitted volume grid.

What if my rounded quantity is below the broker minimum?

Treat it as an explicit exception: skip, choose a suitable smaller instrument or revise the plan deliberately. Automatically raising it to the minimum can exceed the intended exposure or loss budget.

What is the quantity-grid origin?

It is the reference value from which allowed increments are counted. Many simple lot grids are zero-anchored, but the current destination specification is authoritative. A value can have the expected decimal places and still miss a non-zero grid.

Sources and further checks

Use the current source for your exact instrument, account and platform. Referencing a general specification does not establish support for every TradeCopier workflow.

  1. MetaQuotes: Symbol Properties · Checked September 19, 2026
  2. Spotware: Symbol API · Checked September 19, 2026

Found an error? Send a correction with this page's address and a primary source. See our editorial standards for how we handle examples, claims and revisions.

Check the product workflow

Use these pages to check TradeCopier settings and connection requirements for your own setup.

Browse all resourcesCurrent resource: /learn/volume-step-rounding

Start Copying Smarter Today

Connect supported accounts with configurable sizing, risk controls, activity logs, and alerts.

Get Started Free