Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 23:29:20 +0000



[Programming Help] - use Tool

View Count: 697

[2018-07-10 20:32:47]
User39772 - Posts: 311
Is there a known problem with use tool. The moment I enable sc.UseTool(Tool) (see below) SC freezes:

s_UseTool Tool;
    
Tool.Clear(); // Reset tool structure. Good practice but unnecessary in this case.
Tool.ChartNumber = sc.ChartNumber;
Tool.DrawingType = DRAWING_TEXT;
Tool.BeginIndex = sc.IndexOfLastVisibleBar-5;
Tool.BeginValue = 1.1742; // sc.High[sc.Index];
Tool.Color = RGB(0, 0, 0);
Tool.AddMethod = UTAM_ADD_OR_ADJUST;
Tool.MarkerType = MARKER_X;
Tool.MarkerSize = 10;
Tool.LineWidth = 10;
Tool.Text.Format("Test");
//sc.UseTool(Tool);



My intention is to have different strings at different locations in the chart. Do I need
a new tool for every string or is it possible to create different strings at different
locations with one tool ?
[2018-07-11 08:06:31]
Sierra Chart Engineering - Posts: 104368
There is no problem with that code. The issue you are having must be somewhere else in your code causing this. The issue would have to be in your own code somewhere else.

You do need a different drawing instance for each text string you want.
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