Support Board
Date/Time: Fri, 14 Mar 2025 17:34:46 +0000
Post From: How to retrieve Values for a USERDRAWN chart drawing
[2022-06-26 12:59:01] |
User353369 - Posts: 14 |
Anyone, Granted I am a bit of noob but I press on. I am trying to retrieve the values BEGINVALUE ENDVALUE etc. I am able to get the index and lines numbers but not the values. SCSFExport scsf_Retiever(SCStudyInterfaceRef sc)
What an I missing or not understanding?{ // Declare SubGraphs and inputs here if (sc.SetDefaults) { sc.GraphName = "Adjust User Drawn Drawing Example"; sc.GraphRegion = 0; sc.UpdateAlways = 0; sc.AutoLoop = 0; //Code in this section return; } // Data processing code //The following code will get all of the Ray drawings on the chart and make them the 'Line Color ' Input color, change the width to 10, and move the starting point back by one bar. Since this function is continuously called with sc.UpdateAlways, this continuously occurs so you will see the Ray drawings continuously move back. int DrawingIndex = 0; s_UseTool DrawingObject; s_UseTool CurrentDraw; SCString DataString; while (sc.GetUserDrawnChartDrawing(sc.ChartNumber, DRAWING_RECTANGLE_EXT_HIGHLIGHT, DrawingObject, DrawingIndex)) //DRAWING_RAY { //int BarIndex = sc.GetNearestMatchForSCDateTime(sc.ChartNumber, DrawingObject.BeginDateTime.GetAsDouble()); sc.UseTool(DrawingObject); DataString.Format("BeginValue: %d, EndValue: %d, BarIndex: %d, Line#: %d ", DrawingObject.BeginValue, DrawingObject.EndValue, DrawingIndex, DrawingObject.LineNumber); //DrawingObject.BeginDateTime = sc.BaseDateTimeIn[BarIndex - 1]; sc.AddMessageToLog(DataString, 0); DrawingIndex++; } } Thanks in advance Skip |