Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 22:47:30 +0000



[Programming Help] - Compiling Error

View Count: 1539

[2020-04-27 14:52:26]
User247273 - Posts: 37
I downloaded the source code for the COT study from here.
https://www.sierrachart.com/AdditionalFiles/UserContributedACS_SourceCode/COT.cpp

Then I followed these instructions for building a custome study from source code.
How to Build an Advanced Custom Study from Source Code

However. I'm getting an error after I click Remote Build to compile the study. I'm running version 2086. The text of the error is pasted below.

TEXT OF ERROR
-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 09:51:14
Allow time for the server to compile the files and build the DLL.

The remote build did not succeed. Result:

COT.cpp:2:30: fatal error: scstudyfunctions.h: No such file or directory
#include "scstudyfunctions.h"

^
compilation terminated.

-- End of Build -- 09:51:16
[2020-04-27 15:43:14]
User247273 - Posts: 37
UPDATE: I changed the following line of code:
#include "scstudyfunctions.h"
to read
#include "SCStudyFunctions.h"

That led to a new error.

ERROR TEXT
-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 10:42:38
Allow time for the server to compile the files and build the DLL.

The remote build did not succeed. Result:

COT.cpp: In function 'void scsf_TradingLevelsStudy(SCStudyInterfaceRef)':
COT.cpp:299:29: error: conversion from 'SCString' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested
std::string Bufferas = sc.HTTPResponse;

^
COT.cpp:335:29: error: conversion from 'SCString' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested
std::string Bufferas = sc.HTTPResponse;

^

-- End of Build -- 10:42:42
[2020-04-27 15:52:14]
User907968 - Posts: 823
You could try this instead:

std::string Bufferas = sc.HTTPResponse.GetChars()

[2020-04-27 16:47:05]
User247273 - Posts: 37
Thanks. Problem solved with some help from a friend.

I changed the 2 instances of
std::string Bufferas = sc.HTTPResponse;
to
std::string Bufferas = ""; Buffer.Append(sc.HTTPResponse);
[2020-06-20 09:44:42]
User330484 - Posts: 2
Hi,
I get this error when compiling the cot.cpp file

-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 11:40:23
Allow time for the server to compile the files and build the DLL.

The remote build did not succeed. Result:

COT.cpp: In function 'void scsf_TradingLevelsStudy(SCStudyInterfaceRef)':
COT.cpp:299:29: error: conversion from 'SCString' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested
std::string Bufferas = sc.HTTPResponse;
COT.cpp:335:29: error: conversion from 'SCString' to non-scalar type 'std::__cxx11::string {aka std::__cxx11::basic_string<char>}' requested
std::string Bufferas = sc.HTTPResponse;
COT.cpp:427:43: error: ambiguous overload for 'operator-' (operand types are 'SCDateTime' and 'double')
SCDateTime DataDateLessOne = DataDate - 1*DAYS;
COT.cpp:427:43: note: candidate: operator-(double, double) <built-in>
In file included from scstructures.h:98:0,
from sierrachart.h:21,
from COT.cpp:1:
scdatetime.h:1506:19: note: candidate: SCDateTime SCDateTime::operator-(const SCDateTime&) const
inline SCDateTime SCDateTime::operator -(const SCDateTime& DateTime) const
-- End of Build -- 11:40:26

Who can help? thank you
[2020-09-19 21:16:35]
rxtrading - Posts: 33
I am having a similar issue as indicated above.

-- Starting remote build of Custom Studies Source files: COT.cpp. 64-bit -- 16:09:38

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

The remote build did not succeed. Result:

COT.cpp: In function 'void scsf_TradingLevelsStudy(SCStudyInterfaceRef)':
COT.cpp:427:47: error: 'DAYS' was not declared in this scope
427 | SCDateTime DataDateLessOne = DataDate - 1*DAYS;
| ^~~~

-- End of Build -- 16:09:42

Did anyone find a solution for this issue?
[2020-09-19 21:28:25]
ForgivingComputers.com - Posts: 960
The error is here on line 427:

SCDateTime DataDateLessOne = DataDate - 1*DAYS;

Change it to:

SCDateTime DataDateLessOne = DataDate - SCDateTime::DAYS(1);


This was documented as a change here: Required SCDateTime Changes for ACSIL
[2020-10-21 16:19:13]
User616224 - Posts: 6
Hello,

I followed your instructions, I corrected all the mistakes and finally I have successfully compiled the COT, but it still doesn't work. There's a log in Sierra that says: "requesting data from quandl server". Don't you please know what's the problem?
[2020-10-21 16:33:31]
Ackin - Posts: 1865
Study accesses COT data from Quandle.com ( basic free account needed for study )
[2020-10-21 16:41:10]
rxtrading - Posts: 33
Personally, I also had difficulty getting this study to work. After I finally did, it didn't give the data I was looking for. I use IQFeed and get the CoT data from them. Additionally, they have a lot more history.
[2020-10-21 16:48:21]
User616224 - Posts: 6
I do have Quandle.com account and Quandl APIkey, but it doesn't work anyway.
[2020-10-21 17:26:04]
Ackin - Posts: 1865
So try to contact the author of the study via DM (or email)

COT / Commitment of Traders | Post: 170793
[2020-10-21 17:29:00]
Ackin - Posts: 1865
I use IQFeed and get the CoT data from them. Additionally, they have a lot more history.
I know...It's a pity that this is not possible (even for an additional fee) within the Sierrachart datafeed
Date Time Of Last Edit: 2020-10-21 19:53:31

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

Login

Login Page - Create Account