Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 23:00:11 +0000



api request for tool config

View Count: 1143

[2014-06-27 03:46:53]
onnb - Posts: 660
hi, would be nice to have an api that can access the tool config data that a user has specified.

Something like

sc.GetToolConfig(DRAWING_TEXT, "TC1", config) - returns a struct with the configuration values in config
or sc.PopulateTool(tool, "TC1") - receives tool structure that specifies the drawing type and the method populates it for me

both options would be fine.

This is needed so that with acsil studies, we don't need to provide input for tool configurations some of which can be quite lengthy.
[2014-06-27 18:52:04]
Sierra Chart Engineering - Posts: 104368
Hello,

Something like this is already supported. You can specify an existing drawing tool configuration when adding a drawing through ACSIL:
// example using a tool config to set drawing properties
  Tool.Clear(); // reset tool structure for our next use
  Tool.ChartNumber = sc.ChartNumber;
  Tool.DrawingType = DRAWING_HORIZONTALLINE;
  Tool.LineNumber = UniqueLineNumber +23;
  // Set BarIndex to 20 bars from the end
  BarIndex = sc.ArraySize - 20;
  BarIndex = max(BarIndex,0);
  Tool.BeginValue = sc.Close[BarIndex];
  Tool.Region = 0;
  Tool.UseToolCfgNum = 1; // must be 1-8
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;

  sc.UseTool(Tool); // Here we make the function call to add the line

There are no plans to add anything new or different.

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: 2014-06-27 18:52:45
[2014-06-27 19:28:41]
onnb - Posts: 660
Tool.UseToolCfgNum = 1;
this is perfect. wasn't aware it existed


[2014-06-27 21:25:04]
Sierra Chart Engineering - Posts: 104368
This is new.
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