Support Board
Date/Time: Thu, 08 Jan 2026 17:42:01 +0000
Post From: Z-Index
| [2025-11-29 17:22:56] |
| User213910 - Posts: 26 |
|
I figured it out. I had to set both studies to the same PREC_LEVEL value. SCSF Export scsf_DrawTEST1(SCStudyInterfaceRef sc) { // Section 1 - Set the configuration variables and defaults if (sc.SetDefaults) { sc.GraphName = "Draw TEST1"; sc.GraphRegion = 0; sc.DrawStudyUnderneathMainPriceGraph = 1; sc.ScaleRangeType = SCALE_SAMEASREGION; sc.CalculationPrecedence = VERY_LOW_PREC_LEVEL; sc.AutoLoop = 0; return; } // Section 2 - Do data processing here s_UseTool ChartText; ChartText.ChartNumber = sc.ChartNumber; ChartText.LineNumber = 2; ChartText.DrawingType = DRAWING_STATIONARY_TEXT; ChartText.UseRelativeVerticalValues = true; ChartText.BeginDateTime = 75; ChartText.BeginValue = 50; ChartText.DrawUnderneathMainGraph = true; ChartText.FontBold = true; ChartText.FontSize = 100; ChartText.TextAlignment = DT_CENTER | DT_VCENTER; ChartText.Color = RGB(128,128,128); ChartText.Text = "TEST"; sc.UseTool(ChartText); } SCSFExport scsf_DrawTEST2(SCStudyInterfaceRef sc) { // Section 1 - Set the configuration variables and defaults if (sc.SetDefaults) { sc.GraphName = "Draw TEST2"; sc.GraphRegion = 0; sc.DrawStudyUnderneathMainPriceGraph = 1; sc.ScaleRangeType = SCALE_SAMEASREGION; //sc.CalculationPrecedence = VERY_LOW_PREC_LEVEL; sc.AutoLoop = 0; return; } // Section 2 - Do data processing here s_UseTool Line; Line.ChartNumber = sc.ChartNumber; Line.LineNumber = 1; Line.DrawingType = DRAWING_LINE; Line.BeginIndex = sc.IndexOfFirstVisibleBar; Line.BeginValue = sc.Open[sc.IndexOfFirstVisibleBar]; Line.EndIndex = sc.IndexOfLastVisibleBar; Line.EndValue = sc.Close[sc.IndexOfLastVisibleBar]; Line.DrawUnderneathMainGraph = true; Line.LineStyle = LINESTYLE_SOLID; Line.LineWidth = 10; Line.Color = RGB(255,0,0); sc.UseTool(Line); } |
