Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 23:32:25 +0000



Deleting Tool Drawings

View Count: 808

[2018-04-17 19:39:22]
WarriorTrader - Posts: 245
Hello,

What is the behavior of sc.DeleteACSChartDrawing if the line number does not exist?

Do I always have to check if a drawing exists before a call to sc.DeleteACSChartDrawing.

Does sc.DeleteUserDrawnACSDrawing have the same behavior?


Thx,
-WT
[2018-04-17 19:55:15]
Sierra Chart Engineering - Posts: 104368
No deletion takes place if the line number does not exist, with either of these functions.
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
[2018-04-17 20:30:10]
WarriorTrader - Posts: 245
No deletion takes place if the line number does not exist, with either of these functions.


I have notice my code has better performance if I use sc.ChartDrawingExists() before a call to sc.DeleteACSChartDrawing. Am I just seeing something that is not there?

The example in your documentation checks if the line number exist. Why does it check if the line number exits before the call?

Refer to the scsf_UseToolExample() function in the /ACS_Source/studies.cpp file for example code on how to work with this function.


Thx,
--WT
Date Time Of Last Edit: 2018-04-17 20:31:15
[2018-04-17 20:46:44]
WarriorTrader - Posts: 245
Posted the wrong documentation. I meant:

For an example which uses this function, refer to the scsf_DeleteACSChartDrawingExample function in the /ACS_Source/studies.cpp file in the Sierra Chart installation folder.

Date Time Of Last Edit: 2018-04-17 20:47:12
[2018-04-25 04:46:56]
Sierra Chart Engineering - Posts: 104368
It generally is going to be considered best practice to check if the chart drawing exists first.

We would have to see why there is a performance difference but if there is, then certainly check first.
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