Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 22:59:34 +0000



How does Tool.DrawingType == DRAWING_LINE work?

View Count: 794

[2016-12-19 05:58:37]
Edge Player Trading - Posts: 9
The following code draws a line from the starting bar to the last bar of history. However, this code is in a if-block and only gets executed once and there is no code that extends the line. Does the DRAW_LINE work like the DRAW_RAY? If so, is it possible to stop it from extending itself? Thanks.

if (sc.SetDefaults)
  {    sc.GraphName = "Point & Figure Chart";
    sc.AutoLoop = 1; // 0;
    sc.GraphRegion = 0;
    sc.StandardChartHeader = 1;
    

    sc.ValueFormat = VALUEFORMAT_INHERITED;

    sc.FreeDLL = 1;
    
  }
.
.
.
s_UseTool Tool;

Tool.DrawingType = DRAWING_LINE;
                           Tool.EndValue = sc.BaseData[SC_POINT_FIGURE_LOW][sc.ArraySize - 1];
   Tool.Color = RGB(0, 0, 255);
   Tool.AddMethod = UTAM_ADD_OR_ADJUST;
   Tool.BeginDateTime = sc.BaseDateTimeIn[sc.Index - 3];
   Tool.EndDateTime = sc.BaseDateTimeIn[sc.ArraySize - 1];
   Tool.BeginValue = sc.BaseData[SC_POINT_FIGURE_LOW][sc.Index - 3];


   sc.UseTool(Tool);
[2016-12-19 07:13:15]
Sierra Chart Engineering - Posts: 104368
Does the DRAW_LINE work like the DRAW_RAY?
No it does not.

If so, is it possible to stop it from extending itself?
If it is extending itself, it means the block of code is running more than once. You would have to see why. The other thing is to specify a different Date-Time other than the last one:
sc.BaseDateTimeIn[sc.ArraySize - 1];

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

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account