Support Board
Date/Time: Mon, 02 Nov 2026 21:24:36 +0000
Post From: Problems with recompiling
| [2026-11-02 17:09:38] |
| Calculus - Posts: 152 |
|
Due to the latest software update I can't seem to recompile an indicator I have. Any ideas? And if anyone is interested, the indicator is Joe DiNapoli's MACDp, one hell of an indicator... This is the error message - =============================================================================================================================================================================== -- Starting remote build of Custom Studies Source files: MACDp.cpp. 64-bit -- 17:05:49 Allow time for the server to compile the files and build the DLL. Server: https://build.sierrachart.com The remote build is complete. The build failed. MACDp.cpp: In function 'void scsf_PatternSmartStudy(SCStudyInterfaceRef)': MACDp.cpp:82:20: error: 'struct s_sc' has no member named 'FreeDLL' 82 | sc.FreeDLL = 1; | ^~~~~~~ Failed to generate the DLL file. -- End of Build -- 17:05:53 ================================================================================================ This is the .cpp file - // The top of every source code file must include this line #include "sierrachart.h" #define GREEN RGB(0,255,0) #define DKGREEN RGB(0,128,0) #define YELLOW RGB(255,255,0) #define LTYELLOW RGB(255,255,128) #define RED RGB(255,0,0) #define DKRED RGB(198,0,0) #define BLACK RGB(0,0,1) #define WHITE RGB(255,255,255) #define CYAN RGB(0,255,255) #define PURPLE RGB(255,0,255) #define GREY RGB(192,192,192) #define BLUE RGB(0,128,255) #define ORANGE RGB(255, 127, 0) #define PINK RGB(255,192,203) SCDLLName("MACDp") double a,b,c,d,e,f; SCSFExport scsf_PatternSmartStudy(SCStudyInterfaceRef sc) { SCSubgraphRef MACDp = sc.Subgraph[0]; SCSubgraphRef FASTEMA = sc.Subgraph[1]; SCSubgraphRef SLOWEMA = sc.Subgraph[2]; SCSubgraphRef MACD = sc.Subgraph[3]; SCSubgraphRef Signal = sc.Subgraph[4]; SCSubgraphRef temp = sc.Subgraph[5]; SCInputRef FAST = sc.Input[0]; SCInputRef SLOW = sc.Input[1]; SCInputRef Length = sc.Input[2]; // FAST = 8.3897; // SLOW = 17.5185; // Length = 9.0503; // double DIp[]; // double DIm[]; // double averageDIp[]; // double averageDIm[]; // double averageTR[]; if (sc.SetDefaults) { sc.GraphName = "MACDp"; sc.GraphRegion = 0; // sc.ValueFormat = 2; // sc.Subgraph[0].UseStudySummaryCellBackgroundColor =true; MACDp.Name = "MACDp"; MACDp.DrawStyle = DRAWSTYLE_LINE; MACDp.PrimaryColor = CYAN; MACDp.LineWidth = 2; MACDp.DrawZeros = 1; FAST.Name = "FAST"; FAST.SetDouble(8.3897); SLOW.Name = "SLOW"; SLOW.SetDouble(17.5185); Length.Name = "Length"; Length.SetDouble(9.0503); // Threshold_Level_1.Name = "Threshold_Level_1"; // Threshold_Level_1.SetFloat(0.25); // Threshold_Level_2.Name = "Threshold_Level_2"; // Threshold_Level_2.SetFloat(0.5); sc.AutoLoop = 1; //During development set this flag to 1, so the DLL can be modified. When development is completed, set it to 0 to improve performance. sc.FreeDLL = 1; return; } // if (sc.BaseDateTimeIn[sc.Index] >= YMDHMS_DATETIME(2019, 12, 15, 14, 0, 0)) // { // return; // } int i=sc.Index; a = 2 / (1 + FAST.GetDouble()) ; b = 1 - a ; c = 2 / (1 + SLOW.GetDouble()) ; d = 1 - c; e = 2 / (1 + Length.GetDouble()); f = 1 - e; if(i==0){ FASTEMA = (sc.Close * a); SLOWEMA = (sc.Close * c); }else{ FASTEMA =(sc.Close[i-1] * a) + (FASTEMA[i-1] * b) ; SLOWEMA =(sc.Close[i-1] * c) + (SLOWEMA[i-1] * d) ; } MACD = FASTEMA - SLOWEMA; if(i==0){ Signal=(MACD * e); }else{ Signal=(MACD * e) + (Signal[i-1] * f) ; } temp= ((Signal * f) + (FASTEMA * b * e) - (SLOWEMA * d * e) - (FASTEMA * b) + (SLOWEMA * d)) / (a - c - (a * e) + (c * e)) ; MACDp= temp ; } ======================================================================================== Date Time Of Last Edit: 2026-11-02 17:10:39
|
