Position-aware formula logic

Build calculations that reference the current account position.

The Position system formula provides position-related information that can be used in custom calculations.

Possible uses

Position-aware logic can reference values such as average entry price or signed position quantity. Compound results may require SubRefNum or another sub-reference function to select the needed field.

Account awareness

A formula that depends on position state must be tested against the correct trading account. Position changes from another interface can change the formula inputs.

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.