Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:40:24 +0000



Post From: Get x coordinate for future SCDateTime

[2024-01-03 18:55:48]
erwinbeckers - Posts: 22
I'm looking for an ACSIL function to get the x-pixel coordinate for a future date/time
I've found sc.GetNearestMatchForSCDateTime() which works fine for the most part, but not when the date/time references a future date/time and that is exactly my use case

I want to render upcoming news events by vertical lines.
So let's say the current chart time is 13:55 and that there is an upcoming news event at 15.00
Then I would like to draw a vertical line at 15:00. This should be possible since the x-axis already shows future time and the standard drawing tools allows us to draw a line in the future
However, I would like to use the new graphics drawing functions to render the events

See below for an example where there is a news event at 3pm which is indicated by a red vertical line

Please advise

https://www.sierrachart.com/image.php?Image=1704307895145.png