Support Board
Date/Time: Fri, 29 Nov 2024 09:32:20 +0000
Post From: Set subgraph value ACSIL
[2023-02-25 01:23:18] |
Tahir - Posts: 35 |
thanks for the response everyone. code is below. I'm just trying to create a subgraph that plots a line whenever there we close above the previous bar. I'm trying to build on this idea. If I can get this to work then I should hopefully be able to create more advanced price action studies. #include "sierrachart.h" SCDLLName("Highs") SCSFExport scsf_GetChartArrayExample(SCStudyInterfaceRef sc) { SCSubgraphRef Highs = sc.Subgraph[0]; // Set configuration variables if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "highs"; sc.GraphRegion =0; sc.StudyDescription = "Draws a line at new highs."; Highs.Name = "Buy Level"; Highs.DrawStyle = DRAWSTYLE_LINE; Highs.PrimaryColor = RGB(0,255,0); sc. AutoLoop = 1; return; } if (sc.Close[sc.Index] > sc.High[1]) { Highs[sc.Index] = sc.High[sc.Index]; } } |