Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 03:10:12 +0000



are tool object properties accessable?

View Count: 1094

[2017-07-04 20:47:52]
dtl-saw - Posts: 79
Are the tool objects drawn onto the chart using the ACSIL sc.UseTool method or even from drawing one by user GUI built such that I can get the properties of each particular tool?

Example: I've drawn a DRAWING_RETRACEMENT object on the chart by giving the Tool function a "starting point" and "ending point" and then the Tool automatically calculated all of the retracement price levels based on the % values I defined for the drawing. So, essentially the instance should have the price levels stored somewhere within the memory space for that object and what I'd like to do is access those calculated values via properties interface with the object - Is that possible? If so can you give a link to all the property names for all the tools?
[2017-07-04 22:16:32]
dtl-saw - Posts: 79
using the following code fragment immediately after a DRAWING_RETRACEMENT instantiation returns the value of -FLT_MAX which is same as when you do a Tool.Clear()

sc.UseTool(Tool);
for (int index = 0; index < ACSIL_DRAWING_MAX_LEVELS; ++index) {
Buffer.Format("retrace %d has value %f ", 0, Tool.RetracementLevels[index]);
sc.AddMessageToLog(Buffer, 0);
}

Message Log output:
Chart: F.US.ENQU17 [CB] 1 Min #3 | Study: Drawings #2 | retrace 0 has value -340282346638528859811704183484516925440.000000 | 2017-07-04 17:11:23
[2017-07-04 22:20:44]
Sierra Chart Engineering - Posts: 104368
Yes. This is documented on this page here:

Using Drawing Tools From an Advanced Custom Study


You will want to use this function:
Using Drawing Tools From an Advanced Custom Study: sc.GetUserDrawnChartDrawing()
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
[2017-07-05 03:29:05]
dtl-saw - Posts: 79
okay, i'm able to select the drawing but when i use

ChartDrawing.RetracementLevels[n] i'm getting is the percentage values which i programmed into the drawing at the beginning like (23 or 50 or 61.8 etc).

what i initially asked you for was, is there a way to get at the price levels that were calculated for the retracement drawing

example: for a 50% level and with the start at 0 and the end at 1 then i would like to query the drawing 61.8% index and get back 0.382

seems like those values must be available since you allow for showing the price levels on each of the price level lines with "show price" in the options of the retracement tool.

So, is there a way that i can query the retracement drawing object and get those price levels or is what you're currently doing in order to display those price levels what I'll have to end up doing which is calculate those levels given the beginning and ending values of the drawing?

thanks
Date Time Of Last Edit: 2017-07-05 03:32:31
[2017-07-05 04:08:30]
Sierra Chart Engineering - Posts: 104368

what i initially asked you for was, is there a way to get at the price levels that were calculated for the retracement drawing
No, this is not possible and will not be supported.

They are just simply calculated as they are displayed and not stored anywhere.

You will need to calculate them yourself.
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