Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 04:55:52 +0000



[Programming Help] - Errors rebuilding older indicator in v2363

View Count: 244

[2023-05-19 14:09:15]
jivetrader - Posts: 373
-- Starting remote build of Custom Studies Source files: newZZb2.cpp. 64-bit -- 14:08:13

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

The remote build did not succeed. Result:

newZZb2.cpp: In function 'void scsf_newZZb2(SCStudyInterfaceRef)':
newZZb2.cpp:270:37: error: 'struct s_sc' has no member named 'PersistVars'
270 | int &LabelCount = sc.PersistVars->Integers[1];
| ^~~~~~~~~~~
newZZb2.cpp:271:37: error: 'struct s_sc' has no member named 'PersistVars'
271 | int &PriorLastZZEndpointIndex = sc.PersistVars->Integers[2];
| ^~~~~~~~~~~
newZZb2.cpp:272:37: error: 'struct s_sc' has no member named 'PersistVars'
272 | int &ZigZagStartIndex = sc.PersistVars->Integers[3];
| ^~~~~~~~~~~
newZZb2.cpp:326:105: error: 'DAYS' was not declared in this scope
326 | NextSessionStart = sc.GetTradingDayStartDateTimeOfBar(sc.BaseDateTimeIn[sc.UpdateStartIndex - 1]) + 1*DAYS;
| ^~~~
newZZb2.cpp:347:78: error: 'DAYS' was not declared in this scope
347 | NextSessionStart = sc.GetTradingDayStartDateTimeOfBar(IndexDateTime) + 1*DAYS;
| ^~~~
newZZb2.cpp:616:59: error: cannot convert 'SCDateTime' to 'double' in assignment
616 | ZigZagTimeSpan = sc.BaseDateTimeIn[ZigZagIndex+1] - sc.BaseDateTimeIn[BackRefIndex];
newZZb2.cpp:618:53: error: cannot convert 'SCDateTime' to 'double' in assignment
618 | ZigZagTimeSpan = sc.LatestDateTimeForLastBar - sc.BaseDateTimeIn[BackRefIndex];
newZZb2.cpp:622:56: error: cannot convert 'SCDateTime' to 'double' in assignment
622 | ZigZagTimeSpan = sc.BaseDateTimeIn[ZigZagIndex] - sc.BaseDateTimeIn[BackRefIndex];

-- End of Build -- 14:08:17
attachmentnewZZb2.cpp - Attached On 2023-05-19 14:09:00 UTC - Size: 23.74 KB - 67 views
[2023-06-02 03:39:00]
jivetrader - Posts: 373
Hi, is there a resource where I can find out more information on this error?
[2023-06-02 07:37:36]
User431178 - Posts: 410
error: 'struct s_sc' has no member named 'PersistVars'

Instead of above use the functions listed at the link below.
Persistent Variable Functions


error: 'DAYS' was not declared in this scope

Need to use SCDateTime member function for this
Working with the SCDateTime Variables and Values: DAYS()

error: cannot convert 'SCDateTime' to 'double' in assignment

Need to use SCDateTime member function to get datetime as double
Working with the SCDateTime Variables and Values: GetAsDouble()

or look at an alternative way of determining and displaying the time span.
Date Time Of Last Edit: 2023-06-02 07:37:56
attachmentnewZZb2.cpp - Attached On 2023-06-02 07:37:33 UTC - Size: 24.17 KB - 85 views

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

Login

Login Page - Create Account