Obtaining Realtime TimedBars

This tutorial is one in a series that discusses Using CQG From Within MATLAB.

Specifically the downloadable file CQGGetTimedBars.zip contains a sample m-file, showing how to connect to the CQG API from MATLAB. The file shows how to create a custom MATLAB class for instantiating the CQG connection, with methods for starting and stopping the data collection.

This particular example shows how to obtain information on TimedBars, which may include Open, High, Low and Closing data as well as other data for specified time periods. This data is displayed in a tabular/text format in the MATLAB Command Window. However it is suitable for being displayed in candlestick and other type of charts as shown in Figure 1 of the Limitations of the MATLAB COM Interface tutorial.

As written, this particular example is hard coded to obtain data for N-periods up to and including the most recent time. However, it can be modified to obtain data over any historical time period.

In addition to providing online tutorials Goddard Consulting performs contract software development, and conducts hands-on, classroom style, training courses customized to our client's requirements. See our Services and Software Training pages for more information, or Contact Us if you have comments or questions.