Documentation Center

  • Trial Software
  • Product Updates

X_TRADER Price Update

This example shows how to connect to X_TRADER® and listen for price update event data.

Connect to X_TRADER.

X = xtrdr;

Create an event notifier.

The event notifier is the X_TRADER mechanism that lets you define MATLAB® functions to use as callbacks for specific events.


Create an instrument.

Create an instrument and attach it to the notifier.


Define events.

Assign callbacks for validating or invalidating an instrument, and for handling data updates for a previously validated instrument.


Monitor events.

Set the update filter to monitor the desired fields. In this example, events are monitored for updates to last price, last quantity, previous last quantity, and a change in prices. Listen for this event data.

X.InstrNotify(1).UpdateFilter = 'Last$,LastQty$,~LastQty$,Change$';

The last command tells X_TRADER to start monitoring the attached instruments using the specified event settings.

Close the connection.


See Also

| | |

Related Examples

More About

Was this topic helpful?