Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 07:22:21 +0000



Post From: Share a drawing tool across charts

[2013-06-28 22:28:58]
maxpi - Posts: 175
The following code won't compile: [The ACS source folder is not in the typical location, doubt that is a problem]

Tool.Clear(); // reset tool structure for our next use
Tool.ChartNumber = 3;
Tool.DrawingType = DRAWING_LINE;
Tool.LineNumber = UniqueLineNumber +16;
int BarIndex = max(0, sc.ArraySize - 90);
Tool.BeginDateTime = sc.BaseDateTimeIn[sc.Index -111];
Tool.BeginValue = sc.Open[BarIndex];
BarIndex = max(0, sc.ArraySize - 60);
Tool.EndDateTime = sc.BaseDateTimeIn[sc.Index];
Tool.EndValue = sc.Open[BarIndex];
Tool.Color = RGB(0,128,0);
Tool.AddMethod = UTAM_ADD_OR_ADJUST;
s_UseTool::AddAsUserDrawnDrawing = 1;
sc.UseTool(Tool);

Build Output:

-- Starting build of Custom Studies Source File: ASystem.cpp. -- 15:25:23
"C:\SierraChart\CPPCompiler\bin\g++.exe" "C:\SierraChart\ACS_Source\ASystem.cpp" -march=i686 -mtune=i686 -O2 -shared -static -static-libgcc -static-libstdc++ -s -fno-rtti -fno-exceptions -o "C:\Barchart\Data\ASystem.dll"

In file included from C:\SierraChart\ACS_Source\ASystem.cpp:2:0:
C:\SierraChart\ACS_Source\sierrachart.h: In function 'void scsf_ASystem(SCStudyInterfaceRef)':
C:\SierraChart\ACS_Source\sierrachart.h:960:7: error: invalid use of non-static data member 's_UseTool::AddAsUserDrawnDrawing'
C:\SierraChart\ACS_Source\ASystem.cpp:314:18: error: from this location
-- End of Build -- 15:25:23
Date Time Of Last Edit: 2013-06-28 22:30:04