Login Page - Create Account

Support Board


Date/Time: Wed, 15 Jan 2025 16:21:38 +0000



Post From: ACSIL Drawings cannot be selected/moved in 1590

[2017-07-28 15:54:30]
Sierra Chart Engineering - Posts: 104368
There are no known changes which have been made which would cause this and we do not see a problem.

Use this test code for an example. We can select and move the Ray drawing added by this code, through the user interface just fine.

/*==========================================================================*/
SCSFExport scsf_DrawingToolTest(SCStudyInterfaceRef sc)
{
  // Set configuration variables

  if (sc.SetDefaults)
  {
    sc.GraphName = "Drawing Tool Test";

    sc.GraphRegion = 0;

    sc.FreeDLL = 0;

    sc.AutoLoop = 0;

    return;
  }
  
  // Do data processing  

  s_UseTool Tool;

  Tool.Clear(); // reset tool structure
  
  Tool.ChartNumber = sc.ChartNumber;
  Tool.AddAsUserDrawnDrawing = 1;

  // Draws a Ray (extending line) from the the low to the high over the last 10 bars.
  Tool.DrawingType = DRAWING_RAY;
  int &LineNumber = sc.GetPersistentInt(2);
  if(LineNumber != 0)
    Tool.LineNumber = LineNumber;

  // Set BarIndex to 10 bars from the end
  int BarIndex = sc.ArraySize - 10;
  BarIndex = max(BarIndex,0);
  Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex];
  Tool.EndDateTime = sc.BaseDateTimeIn[sc.ArraySize - 1];
  Tool.BeginValue = sc.Low[BarIndex];
  Tool.EndValue = sc.High[sc.ArraySize - 1];
  Tool.Region = 0;
  Tool.Color = RGB(0, 0, 255);
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;

  sc.UseTool(Tool); // Here we make the function call to add the line
  LineNumber = Tool.LineNumber;//Remember line number which has been automatically set

  s_UseTool ChartDrawing;
  sc.GetUserDrawingByLineNumber(sc.ChartNumber, LineNumber, ChartDrawing);


}

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-07-28 15:55:00