Login Page - Create Account

Support Board


Date/Time: Fri, 27 Jan 2023 09:02:24 +0000



ACSIL: How can one get the LineNumber of an ACSDrawing whilst knowing only its Index?

View Count: 77

[2022-11-25 07:14:03]
Bogdan Ciocoiu - Posts: 26
How can one get the LineNumber of an ACSDrawing whilst knowing only its Index?

Thanks,
Bogdan
[2022-11-25 07:39:46]
Bogdan Ciocoiu - Posts: 26
I found it. Here we go:

s_UseTool ChartDrawing;
ChartDrawing.Clear();

for (int Counter = 0; Counter < 10; Counter++){
sc.GetACSDrawingByIndex(sc.ChartNumber, Counter, ChartDrawing, 1);    
sc.DeleteACSChartDrawing(sc.ChartNumber, TOOL_DELETE_CHARTDRAWING, ChartDrawing.LineNumber);
}

Tnx.,
Bogdan
[2022-11-25 09:58:17]
Sierra_Chart Engineering - Posts: 6328
Yes you can iterate through them by using this function:
Using Drawing Tools From an Advanced Custom Study: sc.GetACSDrawingByIndex()
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, use 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