Support Board
Date/Time: Tue, 26 Nov 2024 08:54:05 +0000
Post From: ACSIL code generated by Chat GPT
[2023-04-16 12:01:09] |
58LesPaul - Posts: 429 |
Could someone tell me what I did wrong? I added bradh's line to the bottom of the code but it shows nothing. Within SC studies it shows up as Custom Study DLL(LastPriceExample.dll v2486) I select the + beside that and it will expand and show "Template Function" // The top of every source code file must include this line #include "sierrachart.h" // For reference, refer to this page: // Advanced Custom Study Interface and Language (ACSIL) // This line is required. Change the text within the quote // marks to what you want to name your group of custom studies. SCDLLName("Custom Study DLL") //This is the basic framework of a study function. Change the name 'TemplateFunction' to what you require. SCSFExport scsf_TemplateFunction(SCStudyInterfaceRef sc) #include "sierrachart.h" SCDLLName("Last Price Example") SCSFExport scsf_LastPrice(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { sc.GraphName = "Last Price"; sc.StudyDescription = "Displays the last traded price"; sc.GraphRegion = 0; sc.AutoLoop = 0; sc.FreeDLL = 1; sc.AutoLoop = 1; sc.Subgraph[0].Name = "Last Price"; sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE; sc.Subgraph[0].PrimaryColor = RGB(0, 255, 0); return; } sc.Subgraph[0][sc.Index] = sc.BaseData[SC_LAST][sc.Index]; } I assume I can't just copy/paste the code from above because the colors disappear. Date Time Of Last Edit: 2023-04-16 12:37:31
|