Support Board
Date/Time: Wed, 05 Feb 2025 10:48:38 +0000
Post From: source code for number bars calculated value
[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 |