Support Board
Date/Time: Fri, 13 Jun 2025 07:42:12 +0000
Post From: Programming Help ACSIL
[2022-11-07 02:34:07] |
User183724 - Posts: 194 |
i figured out part of my error... i simply copied the code and didn't make a study out of it. I re wrote the study including some of what is required to make it work. code starts below ============================================================================================================================================ #include "sierrachart.h" // Name of the custom study. SCDLLName("Markerexample") SCSFExport scsf_Markerexample(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "Function"; sc.AutoLoop = 1; // Automatic looping is enabled. return; } // Marker example s_UseTool Tool; int UniqueLineNumber = 74191;//any random number. Tool.Clear(); // Reset tool structure. Good practice but unnecessary in this case. Tool.ChartNumber = sc.ChartNumber; Tool.DrawingType = DRAWING_MARKER; Tool.LineNumber = UniqueLineNumber +1; BarIndex = max(0, sc.ArraySize - 35); Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex]; Tool.BeginValue = sc.High[BarIndex]; Tool.Color = RGB(0,200,200); Tool.AddMethod = UTAM_ADD_OR_ADJUST; Tool.MarkerType = MARKER_X; Tool.MarkerSize = 8; Tool.LineWidth = 5; s_sc.UseTool(Tool); } error starts here ========================================================================================================================================================= -- Starting remote build of Custom Studies Source files: Markerexample.cpp. 64-bit -- 20:29:02 Allow time for the server to compile the files and build the DLL. The remote build did not succeed. Result: Markerexample.cpp: In function 'void scsf_Markerexample(SCStudyInterfaceRef)': Markerexample.cpp:31:1: error: 'BarIndex' was not declared in this scope 31 | BarIndex = max(0, sc.ArraySize - 35); | ^~~~~~~~ Markerexample.cpp:44:5: error: expected unqualified-id before '.' token 44 | s_sc.UseTool(Tool); | ^ -- End of Build -- 20:29:08 still cant make it work but am closer |