Capture a value when an event occurs

Use state-oriented functions when a value should be frozen at the moment of a trigger.

SnapshotNum and related state functions are useful when a reference should be captured once instead of recalculated continuously.

Typical uses

  • Capture a reference price when a trigger fires
  • Store a level used by later strategy logic
  • Record a value at an entry or transition event

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.