So I've been working on figuring out a way to bring the free CFTC COT data into NT, which doesn't offer the COT data via the standard data feed. I've found other COT indicators for $150+ and also a COT feed via IQFeed for $25/mo, but the damn data is free. So I figured out how to bring the data into NT via a WebRequest, and now we have a basic COT indicator that pulls the COT data from Quandl - Find, Use and Share Numerical Data (.
I've build a few COT indicators that Larry Williams discusses in his book "Trade Stocks and Commodities with the Insiders: Secrets of the COT Report", which interests me because I am looking for objective ways to put the market into context. I can't say that I'm to the objective piece with the COT data yet, but I also just got done building the indicators, so now comes the interesting part to see if I can figure out a way that this data can help me.
The next few posts will have the indicators. I hope they all work for you like they do me. You are going to have to register on Quandl's site to get an authentication token that you will then cut and paste into the AventerenCOTv1 indicator's "Variables" section. I didn't include public variables in the indicators (because I don't use the indicators that way), so just open the indicator up and cut and paste your authentication token into the indicator, and then re-compile and you should be good to go.
Quandl limits the number of requests you can make to something like 50 or so without an authentication code. So although you can probably start out without a Quandl token, I suggest you grab one from their site if you are going to be a heavy user of these COT pulls.
To get a Quandl authentication token, go to Quandl - Find, Use and Share Numerical Data ( and sign up. Once you register, find your authentication cycle within your profile. Cut and paste it from there. You should only have to do this once.
Given that the COT data is only released weekly and that I didn't want the indicator to be a resource hog, I put the code within Initialize() of AventerenCOTv1, which means that you will have to F5 the data to refresh it every week. I may change the code in the future to update the data via OnBarUpdate(), but that's not how I trade so I built it the easy way. If I upload this onto a server as a part of an automated strategy, I would probably consider changing it. However it's not worth my time right now.
I'm not a professional coder and I'm entirely self taught from all of the various indicators posted here and on NT's site. So let that serve as a disclaimer that this may not work perfectly--but it works adequately for my current purposes.
My hope is that this thread can be used as a venue to discuss ways that the COT report can be traded. My hope is that I can use it to set bias, while using other objective tools for entries and exits (I've also built a Williams Swing indicator that I use to nest objective short-, intermediate- and long-term swing points for trend direction, entries and exits--however I'm still up in the air on whether to go public with this one yet. We'll see).
I'll do my best to answer your technical indicator questions, but I'm a trader just like you guys, so I'll do what I can on the technical support side of things. Use the indicator as you like.
I also have a goal of using the WebRequest functionality that I drummed up here to pull daily futures data from Quandl into NT for backtesting. That's my next project, and I'll post that data in another thread when I get that figured out. Much of the COT data goes back to 1986, so my goal will be to get daily futures data that stretches back at least as far as the relevant instrument's COT history.