Support Board
Date/Time: Sun, 02 Feb 2025 19:47:26 +0000
Post From: Bug when using DRAWSTYLE_BACKGROUND_TRANSPARENT
[2019-08-04 11:15:44] |
User722856 - Posts: 78 |
Dear Sierra, I think I Found a bug when using the Drawstyle “DRAWSTYLE_BACKGROUND_TRANSPARENT” on two subgraphs, please find an example and Screenshots bellow. As soon as I set for the first SubGraph the Drawstyle from “DRAWSTYLE_COLOR_BAR” to “DRAWSTYLE_BACKGROUND_TRANSPARENT” the second Subgraph plotting (=display) is ignored. Code Example for better understanding & Testing: SCSFExport scsf_Test(SCStudyInterfaceRef sc) { //================================================================================ //Subgraph Definition //================================================================================ SCSubgraphRef SuGr_A = sc.Subgraph[0]; SCSubgraphRef SuGr_B = sc.Subgraph[1]; //===================================================================================================================== // Section 1 - Set the configuration Variables and Default Values // This section is only run once. Refer to documentation for further details. //===================================================================================================================== if (sc.SetDefaults) { //================================================================================ //Set the Defaults for Sierra //================================================================================ sc.GraphName = "Test"; sc.StudyDescription = "Test - Bug found for SC"; sc.GraphRegion = 0; // Use the main price graph region (0 means Chart Region 1, 1 means Chart Region 2, maximum value can be 7=Region 8) // Setting sc.AutoLoop to 1 (true) means looping is performed automatically. This means that if there are 100 bars in your chart, this function is called 100 times initially. sc.AutoLoop = 1; // 1=true //During development set this flag to 1, so the DLL can be rebuilt without restarting Sierra Chart. When development is completed, set it to 0 to improve performance. sc.FreeDLL = 0; //================================================================================ //SubGraph Properties //================================================================================ SuGr_A.Name = "SuGr_A"; //SuGr_A.DrawStyle = DRAWSTYLE_COLOR_BAR; SuGr_A.DrawStyle = DRAWSTYLE_BACKGROUND_TRANSPARENT; SuGr_A.LineWidth = 1; SuGr_A.PrimaryColor = RGB(255, 128, 0); //Orange SuGr_A.DrawZeros = false; SuGr_B.Name = "SuGr_B"; SuGr_B.DrawStyle = DRAWSTYLE_COLOR_BAR; SuGr_B.LineWidth = 1; SuGr_B.PrimaryColor = RGB(255, 255, 0); //Yellow SuGr_B.DrawZeros = false; return; } //===================================================================================================================== //Section 2 - Do data processing here //===================================================================================================================== //================================================================================ // Outside & Inside Bar Range Calculations //================================================================================ if (sc.Index == 1) SuGr_A[sc.Index] = true; else if (sc.Index == 2) SuGr_B[sc.Index] = true; else { SuGr_A[sc.Index] = false; SuGr_B[sc.Index] = false; } } Date Time Of Last Edit: 2019-08-04 11:15:57
|
Image 001.png / V - Attached On 2019-08-04 11:14:42 UTC - Size: 4 KB - 239 views Image 002.png / V - Attached On 2019-08-04 11:14:46 UTC - Size: 7.07 KB - 248 views |