Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 12:31:05 +0000



ACSIL questions

View Count: 1301

[2014-09-02 17:16:35]
Johnny - Posts: 99

Hi, I'm trying to create a custom study and I want to access market data. The source code is the following:

#include "sierrachart.h"

SCDLLName("Volume Profile and Volume Delta")


SCSFExport scsf_FirstAttempt(SCStudyInterfaceRef sc)
{
SCGraphData BaseGraphData;

sc.GetChartBaseData(ChartNumber.GetInt(), BaseGraphData);

SCFloatArrayRef HighArray = sc.BaseGraphData[SC_HIGH];

SCFloatArrayRef LowArray = sc.BaseGraphData[SC_LOW];

SCFloatArrayRef CloseArray = sc.BaseGraphData[SC_LAST];

SCFloatArrayRef VolumeArray = sc.BaseGraphData[SC_VOLUME];

SCFloatArrayRef BidVolumeArray = sc.BaseGraphData[SC_BIDVOL];

SCFloatArrayRef AskVolumeArray = sc.BaseGraphData[SC_ASKVOL];
}


However when I compile it I get the following errors:

-- Starting build of Custom Studies Source files: FirstAttempt.cpp. -- 20:06:23

"E:\SierraChart\CPPCompiler\bin\g++.exe" "E:\SierraChart\ACS_Source\FirstAttempt.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "E:\SierraChart\Data\FirstAttempt.dll"

E:\SierraChart\ACS_Source\FirstAttempt.cpp: In function 'void scsf_FirstAttempt(SCStudyInterfaceRef)':
E:\SierraChart\ACS_Source\FirstAttempt.cpp:30:26: error: 'ChartNumber' was not declared in this scope
sc.GetChartBaseData(ChartNumber.GetInt(), BaseGraphData);
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:35:34: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef HighArray = sc.BaseGraphData[SC_HIGH];
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:40:33: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef LowArray = sc.BaseGraphData[SC_LOW];
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:45:35: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef CloseArray = sc.BaseGraphData[SC_LAST];
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:50:36: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef VolumeArray = sc.BaseGraphData[SC_VOLUME];
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:55:39: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef BidVolumeArray = sc.BaseGraphData[SC_BIDVOL];
^
E:\SierraChart\ACS_Source\FirstAttempt.cpp:60:39: error: 'struct s_sc' has no member named 'BaseGraphData'
SCFloatArrayRef AskVolumeArray = sc.BaseGraphData[SC_ASKVOL];
^
-- End of Build -- 20:06:25


Also, how do I access the volume profile and ask/bid volume difference bars indicator values?

[2014-09-02 18:13:44]
Sierra Chart Engineering - Posts: 104368
With the problems we are seeing with the code and the questions being asked, you really need to spend more time studying ACSIL. Refer to this page:
https://www.sierrachart.com/index.php?page=doc/doc_CreatingDLLs.html


SCFloatArrayRef HighArray = sc.BaseGraphData[SC_HIGH];


Needs to be:

SCFloatArrayRef HighArray = BaseGraphData[SC_HIGH];

We do not provide programming help.
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
Date Time Of Last Edit: 2014-09-02 18:14:29

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

Login

Login Page - Create Account