Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 10:49:21 +0000



[Programming Help] - Acsil Drawing Tool efficiency

View Count: 326

[2023-02-09 20:20:11]
User210937 - Posts: 5
I want to create a study with 20 horizontal lines that will be moved everytime the study is called.
Is it more resource efficient to ?

1) create the 20 lines when the study is initialized and keep moving all the same lines each time the study is called.
2) delete all 20 lines and create 20 new ones at each study call.

If the answer is #1 in the event I only need 15 lines during 1 cycle is it more efficient to hide the 5 uneeded lines
or move them to a spot not in focus on the chart ?

thx
[2023-02-11 23:45:17]
Tony - Posts: 525
Depends on what instrument you are trading, one of the possible solution is that, those 20 lines are always drawn, every time when you try to 'hide' a line, set it to zero value, instead of deleting it (I am trading ES, a zero value guarantees that line disappears from the chart), or when you try to move any line, just give it a different vertical value, it will dramatically simplify your coding. SC is so efficient, drawing 20 lines takes no time. This is not an option for instrument like crude oil when the price had dropped below zero.

Hope I understood your question correctly.
Date Time Of Last Edit: 2023-02-11 23:50:02

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

Login

Login Page - Create Account