Support Board
Date/Time: Tue, 20 Oct 2026 15:29:25 +0000
[Programming Help] - ACSIL — Positioning a historical bar at a specified horizontal chart location
View Count: 20
| [2026-10-20 13:44:06] |
| User623444 - Posts: 3 |
|
Hello Sierra Engineering, I'm developing a custom ACSIL study that allows me to select historical events and automatically navigate the chart to their corresponding date/time. My current implementation uses sc.ScrollToDateTime, which successfully navigates to the selected historical bar. I'd like to improve the user experience by positioning that bar approximately 15–20% from the left edge of the visible chart, leaving the remaining chart area available to examine subsequent price development. Alternatively, I'd be happy with positioning the selected bar a fixed number of bars (e.g., 50) from the left edge. I've investigated: sc.ScrollToDateTime sc.IndexOfFirstVisibleBar sc.IndexOfLastVisibleBar sc.BarIndexToXPixelCoordinate The visible-bar indices allow me to determine the bar's current position, but I haven't identified a supported ACSIL function for controlling its horizontal placement. My questions: Is there a supported ACSIL method to position a specified historical bar at a particular horizontal location within the chart viewport? Can sc.ScrollToDateTime be combined with another supported function to achieve this? Thank you for your guidance. |
| [2026-10-20 14:16:26] |
| John - SC Support - Posts: 48267 |
|
Is there a supported ACSIL method to position a specified historical bar at a particular horizontal location within the chart viewport?
No. Can sc.ScrollToDateTime be combined with another supported function to achieve this?
You would need to scroll to the bar that is forward from the one you want by the amount you want. You could do this by determining the number of bars that make up the chart at that time using the "sc.IndexOfFirstVisibleBar" and "sc.IndexOfLastVisibleBar" and then determining how many indices you need to be forward and then use that Date/Time to scroll the chart to. 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:
