Use ClosestPrice for valid tick increments

Round a calculated order price to a valid tradable price for the contract.

A formula can calculate a mathematically valid number that is not a valid exchange price increment for the selected contract.

ClosestPrice

Use ClosestPrice when a calculated stop, limit, or other order price needs to conform to the contract's minimum tick.

Before live use

Confirm the resulting value in demo. A formula-generated order price should be both logically correct and valid for the selected symbol.

See also: Formula Editor & XapiScript complete reference.

Was this article helpful?

Get Started Now!

Try out our technology for free or open an account and start trading.

There is a substantial risk of loss in trading futures and options.