Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 06:04:37 +0000



[User Discussion] - COT / Commitment of Traders

View Count: 17129

[2017-08-22 04:54:08]
Sierra Chart Engineering - Posts: 104368
In response to post #24 above, we will have a look at this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-08-01 07:00:59]
TLT - Posts: 3
Any progress on this? Would be fantastic.
[2019-02-07 21:49:51]
aknsyu71@gmail - Posts: 54
I have created a sierra study that can connect and download weekly COT data.
Anyone wishing to trial it please message me your sierra Account number (Help -> About) and I will enable it as a custom study for you.
Here is a screenshot: https://drive.google.com/file/d/15PzZ9CB0eHEZG279oZHcPANAp-O7mdWn/view?usp=sharing

https://www.sierrachart.com/UserControlPanel.php?page=StudyStore&SCDLLName=COT+report+study

Thnaks
Date Time Of Last Edit: 2019-02-10 11:33:08
[2019-03-19 12:12:23]
sigmadict - Posts: 95
Does Sierra Chart think of implementing a COT indicator to the platform some time in the future ?

Thank you
Regards
[2020-06-25 08:11:54]
User102686 - Posts: 7
Does Sierra Chart think of implementing a COT indicator to the platform soon?
Thanks
[2020-06-25 11:33:06]
User330484 - Posts: 2
Does Sierra Chart think of implementing a COT indicator to the platform soon?
Thanks
[2020-06-26 17:11:01]
JohnR - User831573 - Posts: 306
People, Back in Feb 2019, aknsyu71@gmail in Post # 27 created what everyone is asking for. It is in User Contributed Studies section of the web. I did not see it compiled as part of the "User Contributed Studies" in "Add Custom Study". You will have to take the source and compile it.

https://www.sierrachart.com/AdditionalFiles/UserContributedACS_SourceCode/COT.cpp

More than 700 different contract codes in 8 COT report types:
- Futures only OR Futures and Options
-- Long Short Positions (_F_ALL or _FO_ALL)
-- Number of Trades (_F_ALL_NT or _FO_ALL_NI)
-- Percent of Open Interest (_F_ALL_OI or _FO_ALL_OI)
-- Change in Position (_F_CHG or _FO_ALL)

Study automatically differentiates between:
- Disaggregated COT Reports ( Commodities )
-- Producer/Merchant/Processor/User
-- Swap Dealer
-- Managed Money
-- Other Reportable

- Financial COT Reports ( Indices, currency futures etc)
-- Dealer/Intermediary
-- Asset Manager
-- Leveraged Funds
-- Other Reportable

- Calculates NET Positions for each report


Study accesses COT data from Quandle.com ( basic free account needed for study )

The study code is now available on the User Contributed page User Contributed Advanced Custom Study System Source Code

JohnR
imageSC_Forum_COT_image.png / V - Attached On 2020-06-25 15:50:14 UTC - Size: 29.06 KB - 770 views
[2020-10-17 11:01:16]
User102686 - Posts: 7
I tried to compile the COT.cpp, but with any success. I get the following message.
https://www.sierrachart.com/AdditionalFiles/UserContributedACS_SourceCode/COT.cpp

-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 12:53:58
Allow time for the server to compile the files and build the DLL.
The remote build did not succeed. Result:
COT.cpp:5:10: fatal error: scstudyfunctions.h: No such file or directory
5 | #include "scstudyfunctions.h"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

-- End of Build -- 12:54:03

I follow the instruction on SC.
How to Build an Advanced Custom Study from Source Code: Step-By-Step Instructions

Could someone tell me how I can fix this issue?
Thx for your support.
[2020-11-14 17:45:28]
User195924 - Posts: 68
I had the same error as @User102686, anyone help please?
[2020-11-14 18:33:29]
User907968 - Posts: 823
Remove this line from the top of the cot.cpp file:
#include "scstudyfunctions.h"
It is not required

-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 12:33:55

Allow time for the server to compile the files and build the DLL.

The remote build succeeded.

Writing file to: F:\SierraChart_DEV2\Data\COT_64.dll
-- End of Build -- 12:33:59

Date Time Of Last Edit: 2020-11-14 18:34:46
[2020-11-14 18:43:22]
User195924 - Posts: 68
Thanks, I removed that but got a new error...

The remote build did not succeed. Result:

COT.cpp: In function 'void scsf_TradingLevelsStudy(SCStudyInterfaceRef)':
COT.cpp:298:29: error: conversion from 'SCString' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
298 | std::string Bufferas = sc.HTTPResponse;
| ~^~~~~~
COT.cpp:334:29: error: conversion from 'SCString' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
334 | std::string Bufferas = sc.HTTPResponse;
| ~^~~~~~
COT.cpp:426:47: error: 'DAYS' was not declared in this scope
426 | SCDateTime DataDateLessOne = DataDate - 1*DAYS;
| ^~

-- End of Build -- 12:41:38
[2020-11-14 18:49:25]
User907968 - Posts: 823
See attached copy of COT.cpp with those errors resolved.
attachmentCOT.cpp - Attached On 2020-11-14 18:48:28 UTC - Size: 23.24 KB - 716 views
[2020-11-14 19:14:37]
User195924 - Posts: 68
Thank You 😊 . Working Perfectly
[2020-11-15 17:46:17]
User102686 - Posts: 7
Thank you! :-)
Working perfect now!
[2020-11-16 08:59:56]
User90125 - Posts: 715
+1

Thanks!
[2020-11-26 22:57:58]
User485461 - Posts: 9
Thank you guys appreciate your help.
However I'm getting the lines displayed but not the values on the top part of the chart for COT.
Is there anything I'm missing ?

Please see the attached image
imageCOT .jpg / V - Attached On 2020-11-26 22:57:24 UTC - Size: 118.84 KB - 640 views
Attachment Deleted.
[2020-11-27 08:12:22]
User907968 - Posts: 823
Is there anything I'm missing?
No, there is just not any data at the last visible chart bar yet.
Scroll back to an earlier bar and the region data line values should populate.
[2020-12-08 15:52:56]
Mattthespaniard - Posts: 41
Two things bug me about this otherwise nice try at a custom study to plot COT in SierraChart:

1. It doesn't seem to pick up the very last row ( most up to date ) in Quandle's dataset.

2. It plots shorts as positive integers instead of converting them to negative.

For years now I have been keeping track of COT data using SierraChart spreadsheet capabilities but I should be happy to get rid of that if only the aforementioned issues were resolved.

See chart attached for an example of what I mean. The upper indicator is my version of COT and the bottom one is the custom study. Date is 2020-12-08.

http://www.sierrachart.com/image.php?Image=1607442719491.png
[2020-12-12 17:08:45]
User195924 - Posts: 68
I updated SC to the latest version and this stopped working... help?
[2020-12-13 23:19:56]
@TRADE_YOUR_PLAN - Posts: 129
Two things bug me about this otherwise nice try at a custom study to plot COT in SierraChart:

1. It doesn't seem to pick up the very last row ( most up to date ) in Quandle's dataset.

2. It plots shorts as positive integers instead of converting them to negative.

In regards to post 42, in chart settings when using Historical Chart Chart Data Type, in the Gap Fill settings, setting this to "Gap Fill - Fill All Bar Gaps" will cause the latest row from quandle to display. Not sure how to solve #2.
[2020-12-15 20:07:15]
Mattthespaniard - Posts: 41
With regard to post 44 the suggested "Gap Fill - Fill All Bar Gaps" setting makes no difference to me. My data file is a csv text file of rebuilt weeks from Wednesday to Tuesday.
[2021-01-11 09:20:51]
Mattthespaniard - Posts: 41
Now this custom study has stopped working altogether. It seems recompilation is needed to make it work with newer versions of SC. Any ideas how to do that ?
[2021-01-11 10:15:04]
User907968 - Posts: 823
Hi,
You can download the COT.cpp file from post 36 - COT / Commitment of Traders | Post: 240729 - this should still work ok.

Follow instructions here to recompile - How to Build an Advanced Custom Study from Source Code

If you get any errors, post them here.
[2021-01-11 10:48:27]
Mattthespaniard - Posts: 41
Well, I did as suggested and the remote build was successful. However, the same message...

Setting study DLL module function objects to indicate DLL is not loaded: C:\SierraChart\SierraChartTransActMA\Data\COT.dll | 2021-01-11 11:34:56.347
Unloaded DLL: C:\SierraChart\SierraChartTransActMA\Data\COT.dll. Handle: 66000000 | 2021-01-11 11:34:56.349
HTTPS connection ID:1 to build.sierrachart.com:443 for request ID:1 (5) | CloseSocket call. | 2021-01-11 11:34:56.609
HTTPS connection ID:1 to build.sierrachart.com:443 for request ID:1 (5) | 0 bytes remaining in receive buffer when socket closed. | 2021-01-11 11:34:56.609
HTTPS connection ID:1 to build.sierrachart.com:443 for request ID:1 (5) | Shutdown started. Waiting for graceful close. | 2021-01-11 11:34:56.609
Loading DLL: C:\SierraChart\SierraChartTransActMA\Data\COT_64.dll. Handle: 66000000 | 2021-01-11 11:36:08.518
Chart: HG_Weekly_COT_ready Weekly #6 | Study: COT - Copper | ######## Received 762 COT lines of data from server. | 2021-01-11 11:37:55.922 *
Chart: HG_Weekly_COT_ready Weekly #6 | Study: COT - Copper | ######## Loading data to subgraphs | 2021-01-11 11:37:55.923 *
COT - Copper needs to be recompiled for this version of Sierra Chart. | 2021-01-11 11:37:55.923 *
COT - Copper needs to be recompiled for this version of Sierra Chart. | 2021-01-11 11:37:55.923 *
HTTPS connection ID:4 to www.quandl.com:443 for request ID:4 (4) | Timed out waiting for shutdown. Performing an immediate socket close. | 2021-01-11 11:40:13.642


Do I need to delete the previous COT_64.dll and reset first ? I have noticed it overwrites the previous COT_64.dll but to no effect.
[2021-01-11 11:01:28]
Mattthespaniard - Posts: 41
Sorted.

First remove all COT studies, exit SC, delete COT_64.dll

And then perform the remote build and add the custom study.

Although the same old issue remains: the study doesn't load ( or shows, I'm not sure which ) the most recent historical line despite the data being available in Quandl's database.

Maybe a settings issue on my part or a coding error. Any help ?
[2021-01-11 11:23:02]
User907968 - Posts: 823
Ok, well that's a start, at least it works again.

Although the same old issue remains: the study doesn't load ( or shows, I'm not sure which ) the most recent historical line despite the data being available in Quandl's database.

Maybe a settings issue on my part or a coding error. Any help ?

The latest data from Quandl is displayed (for me at least anyway), it is just offset back a week, due to the date on the COT report.
If you are showing on a weekly chart, you can just set the displacement to 1, so that the subgraphs show in the current bar - Chart Studies: Subgraphs Tab >> Displacement

NOTE - I am not the author of the study, only updated the parts required for it to compile in newer versions of SC.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account