Login Page - Create Account

Support Board


Date/Time: Sat, 15 Nov 2025 14:52:21 +0000



How to get current time for time-based alerts?

View Count: 208

[2025-09-17 00:23:51]
neevaksama - Posts: 70
Hello SC Team,

- I'm trying to avoid using ASCIL so the below is kind of out
sc.CurrentSystemDateTime


- The below alert is also out since I use range bars and I don't really want to use additional charts (i.e 1m/5m for this to work)
=AND(BARTIME >= TIME(9, 45, 0), BARTIME <= TIME(9, 45, 59))


- So I tried this:
=AND(FRACTIME(NOW()) >= FRACTIME(TIME(9, 45, 0)), FRACTIME(NOW()) < FRACTIME(TIME(9, 46, 0)))

===
- However, I don't even see this in Alert Manager (or any alert)

Main qn: Could you point to me where I went wrong?
Sub qn 1: Why does Log Evaluated Formula at Each Evaluation not show the evaluated formula? It just shows the formula as it is. (Attached an image)
Sub qn 2: I was testing it during market replay and I noticed the DateTime column of the logs was showing the latest live date/time rather than latest market replay's date/time. Is this intended? (Attached an image)
imagealert-manager-time.png / V - Attached On 2025-09-17 00:23:20 UTC - Size: 1.64 KB - 71 views
imagealert-manager-formula.png / V - Attached On 2025-09-17 00:23:24 UTC - Size: 15.29 KB - 69 views
[2025-09-17 14:56:40]
John - SC Support - Posts: 43003
Where are you entering this formula and how do you have the options set for it?

Also, what exactly are you wanting to accomplish? If you just want an alert at 09:45, then use the Time Alerts. Refer to the following:
Alerts Manager: Time Alerts
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2025-09-17 17:02:46]
neevaksama - Posts: 70
For convenience sake I placed the following into my Clock indicator > Alerts Tab

- Code that checks if time is 9:45:00AM - 9:45:01AM:
=AND(FRACTIME(NOW()) >= FRACTIME(TIME(9, 45, 0)), FRACTIME(NOW()) < FRACTIME(TIME(9, 45, 1)))
- Enabled option checked

-------------

Yup, you're right, a simple alert at 09:45.

The Time Alert doesn't seem to work in Market Replay as I can't set past timings.
[2025-09-17 21:06:33]
John - SC Support - Posts: 43003
You are correct, the Time Alert will not work in replay. And the function NOW() also will not work in Replay as it gives the actual computer system time, not the time of the replay.

There really is no other option (apart from creating an ACSIL study) but to open a separate chart that uses time-based bars and then put an alert formula in it and run the replay using both charts. You can then reference the bar start time, so your alert condition would be the following:
=AND(BARTIME >= TIME(09, 45, 00), BARTIME < TIME(09, 45, 01))
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:

Login

Login Page - Create Account