Is it possible to get the TS Commitment of Traders data into MultiCharts?
In TS there appears to be an indicator that displays the Net Position or Total Position for futures markets. This must be based on some raw data feed so I wondered if it's possible to import this into Quote Manager like the other TS markets. In the TS documentation there is reference to "Fundamental Data". Not sure if this comes from somewhere different to the normal market data.
CoT Commitment of Traders Data
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: CoT Commitment of Traders Data
This should be possible, just like you mention: by importing this data in the QuoteManager. You can download COT data here from Quandl, but I suppose there are also other online sources that offer this data for free. From the quick look I had at Crude Oil data there, it does seem that there are several datasets not updated anymore.Is it possible to get the TS Commitment of Traders data into MultiCharts?
In TS there appears to be an indicator that displays the Net Position or Total Position for futures markets. This must be based on some raw data feed so I wondered if it's possible to import this into Quote Manager like the other TS markets. In the TS documentation there is reference to "Fundamental Data". Not sure if this comes from somewhere different to the normal market data.
I think that you might have a bigger challenge in finding a good, reliable, and up-to-date data source than the actual process of getting the data in MultiCharts.
Re: CoT Commitment of Traders Data
Hi Josh,
TS offer the COT data in real time, well I guess it's updated weekly but there is a COT indicator in the platform that you can load to a chart and it gives you the graphs for comm/non-comm etc. I use TS as a data feed so I wondered if there is a way to get the data to feed into Multicharts as a real time feed so I can use it in an automated strategy.
I've looked at the EL code for the COT indicator and it uses a function called "FundValue" which in the help file says this pulls in "Fundamental Data". So not sure if this is handled differently to normal market data. I've tried to search in Quote Manager for the market symbols referenced in the code but it doesn't find them.
Here is the EL indicator code for reference:
I've tried searching for "COTF" and "COTC" but doesn't find it.
I could import manually from csv as a backup plan. But it would be great if could have it update from the TS feed in real time.
TS offer the COT data in real time, well I guess it's updated weekly but there is a COT indicator in the platform that you can load to a chart and it gives you the graphs for comm/non-comm etc. I use TS as a data feed so I wondered if there is a way to get the data to feed into Multicharts as a real time feed so I can use it in an automated strategy.
I've looked at the EL code for the COT indicator and it uses a function called "FundValue" which in the help file says this pulls in "Fundamental Data". So not sure if this is handled differently to normal market data. I've tried to search in Quote Manager for the market symbols referenced in the code but it doesn't find them.
Here is the EL indicator code for reference:
Code: Select all
using elsystem;
input:
int FuturesOnly_Or_FuturesAndOptions_1_or_2( 1 )
[DisplayName = "FuturesOnly_Or_FuturesAndOptions_1_or_2", ToolTip =
"Enter 1 to use the 'futures only' report; enter 2 to use the 'futures and options' report."];
variables:
bool Initialized( false ),
string FieldNamePrefix( "" ),
string CommLongFieldNme( "" ),
string CommShortFieldNme( "" ),
string NonCommLongFieldNme( "" ),
string NonCommShortFieldNme( "" ),
string SpecLongFieldNme( "" ),
string SpecShortFieldNme( "" ),
double CommLong( 0 ),
double oCommLongErr( 0 ),
double CommShort( 0 ),
double oCommShortErr( 0 ),
double NonCommLong( 0 ),
double oNonCommLongErr( 0 ),
double NonCommShort( 0 ),
double oNonCommShortErr( 0 ),
double SpecLong( 0 ),
double oSpecLongErr( 0 ),
double SpecShort( 0 ),
double oSpecShortErr( 0 ),
double CommNet( 0 ),
double NonCommNet( 0 ),
double SpecNet( 0 );
if Initialized = false then
begin
if Category > 0 then
throw Exception.Create( !( "Commitments of Traders studies can be applied only to futures symbols." ) );
Initialized = true;
if FuturesOnly_Or_FuturesAndOptions_1_or_2 = 1 then
FieldNamePrefix = "COTF-"
else
FieldNamePrefix = "COTC-";
CommLongFieldNme = FieldNamePrefix + "12";
CommShortFieldNme = FieldNamePrefix + "13";
NonCommLongFieldNme = FieldNamePrefix + "9";
NonCommShortFieldNme = FieldNamePrefix + "10";
SpecLongFieldNme = FieldNamePrefix + "16";
SpecShortFieldNme = FieldNamePrefix + "17";
end;
CommLong = FundValue( CommLongFieldNme, 0, oCommLongErr );
CommShort = FundValue( CommShortFieldNme, 0, oCommShortErr);
NonCommLong = FundValue( NonCommLongFieldNme, 0, oNonCommLongErr );
NonCommShort = FundValue( NonCommShortFieldNme, 0, oNonCommShortErr );
SpecLong = FundValue( SpecLongFieldNme, 0, oSpecLongErr );
SpecShort = FundValue( SpecShortFieldNme, 0, oSpecShortErr );
if oCommLongErr = fdrOk and oCommShortErr = fdrOk then
begin
CommNet = CommLong - CommShort;
Plot1( CommNet, !( "Comm" ) );
end;
if oNonCommLongErr = fdrOk and oNonCommShortErr = fdrOk then
begin
NonCommNet = NonCommLong - NonCommShort;
Plot2( NonCommNet, !( "NonComm" ) );
end;
if oSpecLongErr = fdrOk and oSpecShortErr = fdrOk then
begin
SpecNet = SpecLong - SpecShort;
Plot3( SpecNet, !( "Spec" ) );
end;
Plot4( 0, !( "ZeroLine" ) );
I could import manually from csv as a backup plan. But it would be great if could have it update from the TS feed in real time.
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: CoT Commitment of Traders Data
Hi Parker,
I am afraid directly accessing the fundamental data TS provides is not possible via code in Multicharts.
Besides importing the data into MC manually it might also be possible to exchange the data between TS and MC with custom code (for example via text files, Custom DLLs or Excel).
Regards,
ABC
I am afraid directly accessing the fundamental data TS provides is not possible via code in Multicharts.
Besides importing the data into MC manually it might also be possible to exchange the data between TS and MC with custom code (for example via text files, Custom DLLs or Excel).
Regards,
ABC
Re: CoT Commitment of Traders Data
Hi ABC,
Good idea!.. I think the text file could work. I could print the data from TS to a file, and then map the file to a symbol in Quote Manager. I wonder if the data would auto update in MC when the file changes if I used the ASCII mapping option.
Thanks!
Good idea!.. I think the text file could work. I could print the data from TS to a file, and then map the file to a symbol in Quote Manager. I wonder if the data would auto update in MC when the file changes if I used the ASCII mapping option.
Thanks!
Re: CoT Commitment of Traders Data
Hi Chris,Hi Parker,
I am afraid directly accessing the fundamental data TS provides is not possible via code in Multicharts.
Besides importing the data into MC manually it might also be possible to exchange the data between TS and MC with custom code (for example via text files, Custom DLLs or Excel).
Regards,
ABC
If I want to integrate the COT report as a filter into a strategy, would you be able to implement that 'exchange' between TS and MC using ELCollections or something similar?
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: CoT Commitment of Traders Data
tonyt,
that should be possible, although a direct exchange using ELCollections would not be possible. Please feel free to contact me outside of this forum or send me a PM, if you want to discuss this further.
Regards,
ABC
that should be possible, although a direct exchange using ELCollections would not be possible. Please feel free to contact me outside of this forum or send me a PM, if you want to discuss this further.
Regards,
ABC
Re: CoT Commitment of Traders Data
I remembered that if data changes, we need to import the CSV file again. every week import the data again, which is not convenient.
-
- Posts: 310
- Joined: 02 Nov 2010
- Has thanked: 26 times
- Been thanked: 23 times