To subscribe to the CQG instrument and
get current data, create the connection c using cqg and startUp.
Register an event handler for tracking events associated with connection
status. Set up the API configuration properties. Then, register an
event handler for tracking events associated with instrument subscription.
For an example demonstrating these activities, see Request CQG Real-Time Data.
See CQG API Reference Guide to learn more
about event handlers and the API configuration properties.
With the connection established, subscribe to the instrument.
The instrument name must be formatted in the CQG long symbol
view. For example, to subscribe to a security tied to corn, type the
following.
instrument = 'F.US.EZC';
realtime(c,instrument)
MATLAB® writes the structure variable cqgDataEZC to
the Workspace browser.
CQG connection, specified as a CQG connection object
created using cqg.
CQG instrument name, specified as a character vector or string scalar that
identifies the instrument or security. For a list of CQG instrument names, see Tradable
Symbols.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.