Test a custom formula or strategy safely

Validate custom logic in stages before using it with live orders.

Custom formulas can affect live order prices and order behavior. Build and test the logic incrementally.

Recommended workflow

  1. Start with the simplest native strategy that meets the objective.
  2. Use an existing system formula when possible.
  3. Create one custom component at a time.
  4. Save and test each stage.
  5. Confirm calculated prices use valid contract ticks.
  6. Test under realistic demo-market conditions.
  7. Inspect the actual working orders created by the strategy.
  8. Move to live only after behavior has been verified.

Test failure paths

Check what happens when the trigger never occurs, an order is cancelled, or only part of the intended position is filled.

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.