The videos and screenshots below show how you can import data into TradeStation using an Excel spreadsheet and TradeStation EasyLanguage functions.
This example uses the CFTC's (Commodity Futures Trading Commission) Commitment of Traders data. This data is now part of TradeStation's data feed. However, the principles apply to any data source that is not in-built in TradeStation.
Alternatively, if you don't use TradeStation, the Excel spreadsheet (download at bottom of page) shows how to calculate the Professional's position – Long or Short percentage of total Open Interest – from the raw data for the Stock Market Index futures.
Commitment of Traders – Importing Data into TradeStation (Video 1)
Commitment of Traders – Importing Data into TradeStation (Video 2)
Step 1: Download Commitment of Traders Data from CFTC

Commitment of Traders: Raw Data from CFTC
The Commitment of Traders data is collected weekly after the close on Tuesday and the Commitment of Traders Report is published after the close on Friday. You can find the weekly Reports on the CFTC's website in text and spreadsheet formats. I use the 'Compressed – Futures Only Report' in Excel format. Once you've downloaded and unzipped the Excel spreadsheet, the raw data looks like the screenshot above.
The Commitment of Traders report breaks down Open Interest for all traded futures contracts into Long and Short positions by type of player. The people to follow most closely are the large, professional traders or 'Commercials'. They are considered the "smart money" and give valuable clues as to future market direction.
Step 2: Copy Commitment of Traders Data into Analysis Spreadsheet

Commitment of Traders: Analysis Spreadsheet
The next step is to copy this raw Commitment of Traders data into an analysis Excel spreadsheet. The original CFTC spreadsheet needs to be cleaned up first, using the following steps:
- Delete all columns except Market, Report Date, Open Interest, Commercial Long and Commercial Short
- Re-order the lines of data by most recent Report Date first
- Delete all old lines of data not required
- Delete all markets except the Stock Market Index and Forex futures
- Copy the remaining data into the analysis spreadsheet that calculates net positions (i.e. Long minus Short) as a percentage of Open Interest and adjusts by margin requirements for combined (e.g. all "mini") contracts
Step 3: Copy Code into TradeStation EasyLanguage Functions

Commitment of Traders: TradeStation EasyLanguage Function (SP)
Next, copy the TradeStation EasyLanguage code that this spreadsheet generates to the bottom of the Commitment of Traders data lookup functions within TradeStation and then verify.
Step 4: Use EasyLanguage Functions in Other Indicators

Commitment of Traders: TradeStation EasyLanguage Indicator
The image above shows the EasyLanguage function in use in a TradeStation indicator for plotting Commitment of Traders data. Note, the indicator can plot any one of the Commitment of Traders data functions (ES, SP, Large contracts, "Mini" contracts, etc.).
Step 5: Insert Commitment of Traders Indicator on Chart

Commitment of Traders: Better COT Indicator
The image above illustrates a basic Commitment of Traders indicator – the Better COT indicator – plotted on a weekly chart of the Emini. The cyan histogram shows the large contract (SP) 'Commercials' net position. This was +2.5% of total Open Interest (i.e. Long) for the last week of May 2008.
Click on the button above to download the FREE Commitment of Traders Excel spreadsheet, TradeStation EasyLanguage code and text versions of the indicators.
You now have all the tools to keep track of the 'Commercials' yourself. Just visit the CFTC website each week, download the latest data and update the Excel spreadsheet and indicators. Alternatively, I publish the updated Commitment of Traders charts at the end of every week. Make sure you subscribe to the free website updates.



