Support Board
Date/Time: Tue, 26 Nov 2024 08:28:28 +0000
Post From: ACSIL code generated by Chat GPT
[2023-04-16 13:36:02] |
ForgivingComputers.com - Posts: 960 |
If you are going to use something like ChatGPT, don't expect miracles. You also should be able to understand what it is doing or you are asking for trouble. If your goal is to learn ACSIL, then the examples provided by Sierra Chart are much more useful than the code generated by a Chatbot. Back to your study. You have extra and incorrect lines of code that are causing this to break. This function has no curly brackets: SCSFExport scsf_TemplateFunction(SCStudyInterfaceRef sc)
This is all that you need: #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 = 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]; } |