Login Page - Create Account

Support Board

Date/Time: Sun, 26 Jun 2022 23:34:36 +0000

ACSIL - get all values of all horizontal lines on the chart

View Count: 72

[2022-05-22 12:57:49]
maxima120 - Posts: 139
how do I get a chart horizontal lines or rays values from a study? I need to write them in a file

I tried UserDrawnChartDrawingExists and ChartDrawingExists but no lines found although there are several lines on the chart

for(int i = 0; i < 2147483647; i++)
if (sc.UserDrawnChartDrawingExists(chartId, i))
SCString msg;
msg.Format(" Found line #: %d", i);
sc.AddMessageToLog(msg.GetChars(), 0);

Date Time Of Last Edit: 2022-05-22 13:23:27
[2022-05-22 14:39:32]
maxima120 - Posts: 139
I found the solution (for some reason line numbers are negative):

s_UseTool drawing;
if (sc.GetUserDrawnChartDrawing(chartId, DRAWING_HORIZONTAL_RAY, drawing, i) > 0)

[2022-05-22 17:18:06]
JohnR - User831573 - Posts: 140

line #s are negative for user (U/I) drawn and positive for ACSIL drawn. Also it can be negative from ACSIL if it is designated as user drawn.

In ACSIL, if a LineNumber is not specified, it will be automatically assigned as a positive number, or usually negative in the case of user drawn drawing.
The default value for LineNumber is -1 which is a flag to the sc.UseTool function to automatically assign the LineNumber.

Hope this helps,
Date Time Of Last Edit: 2022-05-22 17:18:59

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


Login Page - Create Account