Pulling Historical Settlement Data

A common request is an RTD formula to pull historical settlement prices for a particular market. There is a “Contract Data” RTD formula for settlement:

=RTD("CQG.RTD", ,"ContractData", "CLE", "Settlement",, "T")

However, “Contract Data” RTD syntax accesses the same CQG module used for the Quote SpreadSheet (QSS) displays. No historical data is available in the QSS except yesterday’s data (e.g. yesterday’s open or yesterday’s high).

Study Data RTD syntax accesses the same CQG module used for building charts and, therefore, you can pull historical data. However, we do not have an RTD Study call for settlement from the chart, only close.

But if you set your CQG charts to use settlements, then using close in the RTD syntax will pull in the settlement. For example, this RTD formula will pull in the settlement from 10 days ago.

= RTD("cqg.rtd",,"StudyData","CLEF7", "Bar",, "Close","D","-10",,,,,"T")

To set your charts to use settlements, go to Setup // System Preferences // Settlement and Close and set the charts to use Settlement as shown in the image.

For more information, here is the Help file.

Microsoft Excel is a registered trademark of Microsoft Corporation in the United States and/or other countries.