Login Page - Create Account

Support Board


Date/Time: Thu, 13 Feb 2025 18:42:25 +0000



Post From: ACSIL issue with writing drawings to remote chart

[2020-12-12 22:36:31]
Sierra Chart Engineering - Posts: 104368
We have tested this, and we cannot see any problem. Here is a function which you can use for testing. We also did a test using chart replay. Still no problem.

SCSFExport scsf_UseToolExampleRectangleHighlight(SCStudyInterfaceRef sc)
{
  // Draw a rectangle highlight

  // Set configuration variables
  if (sc.SetDefaults)
  {
    sc.GraphName = "UseTool Example: Rectangle Highlight";
    sc.GraphRegion = 0;
    
    sc.AutoLoop = 0; //No automatic looping

    return;
  }

  if (sc.LastCallToFunction)
    return;

  // Do data processing  
  int BarIndex = 0;

  int& r_LineNumber = sc.GetPersistentInt(1);

  s_UseTool Tool;

  //Tool.ChartNumber = sc.ChartNumber;
  Tool.DrawingType = DRAWING_RECTANGLEHIGHLIGHT;  

  if (r_LineNumber != 0)
    Tool.LineNumber = r_LineNumber;

  // Update BarIndex to 30 bars from the end
  BarIndex = max(sc.ArraySize - 25, 0);
  Tool.BeginDateTime = sc.BaseDateTimeIn[BarIndex];
  BarIndex = max(sc.ArraySize - 15, 0);
  Tool.EndDateTime = sc.BaseDateTimeIn[BarIndex];
  Tool.BeginValue = sc.GetHighest(sc.Low, BarIndex, 10);
  Tool.EndValue = sc.GetLowest(sc.Low, BarIndex, 10);
  Tool.Color = RGB(255, 0, 0); // Red
  Tool.LineWidth = 1; //To see the outline this must be 1 or greater.
  Tool.SecondaryColor = RGB(0, 255, 0);
  Tool.TransparencyLevel = 50;
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;

  // Add rectangle drawing to chart number 2.
  Tool.AddAsUserDrawnDrawing = 1;
  Tool.ChartNumber = 2;

  sc.UseTool(Tool);

  r_LineNumber = Tool.LineNumber;//Remember line number which has been automatically set
}

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: 2020-12-12 23:02:29