Support Board
Date/Time: Wed, 05 Feb 2025 10:52:47 +0000
source code for number bars calculated value
View Count: 173
[2024-12-20 15:26:39] |
User887126 - Posts: 79 |
Hi SC team, i know that source code is not available for number bars. how about number number bars calculated value and number bar calculated value 2 studies? my current study is using getstudyarray study to grab the information from number bars calculated value study. i want to get that information directly into the acsil and delete the number bars calculated study (For example, i want to calculate the volume per sec for each bar directly in my coderather than using getstudyarray study to get it). please advise. Calculation time for my acsil is currently about 240ms and i am trying to cut down that time. |
[2024-12-20 16:27:29] |
John - SC Support - Posts: 37728 |
The source code is not available. But you do have access to the underlying information that makes up many of the calculations in the Numbers Bars Calculated Values, so you can calculate these on your own. The Volume per Second in particular is just taking the total volume for a bar and dividing by the time period of the bar. Refer to the following for how to access the volume at price information: ACSIL Programming Concepts: Accessing Volume at Price Data Per Bar For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2025-01-06 20:19:27] |
John - SC Support - Posts: 37728 |
Keep in mind how time is stored in Sierra Chart. Refer to the following: Working with the SCDateTime Variables and Values: SCDateTime Variables Therefore, when you subtract the two items you are, you are ending up with a fraction of a day. So you need adjust that to get whatever time type you want. For instance, if you want portions of an hour, then multiply by 24 (24 hours in a day). If you want minutes, you would need to multiply by 1440 (1440 minutes in a day (24*60)), etc. This also means that when a bar first opens, your times are going to be exactly the same and give you a result of zero. This is normal and correct. You need to handle that situation. 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: