Support Board
Date/Time: Tue, 04 Nov 2025 01:17:17 +0000
[Programming Help] - How to play an alert sound on every bar when there is 1 min left on a 5 min chart?
View Count: 505
|   [2023-06-23 03:30:54]     |  
| fuzzy - Posts: 7 | 
| 
                I am trying to write an Alert Condition on the Main Chart/Price Graph so that it plays alert sound on every bar when there is  1 min left to the close of 5 min bar. I tried the following, but it doesn't work: ABS((NOW()-BARTIME)-TIME(0,4,0))<TIME(0,0,1) My understand of these functions maybe wrong. Anyone can help me to fix this? Thanks in advance.  | 
        
|   [2023-06-23 13:29:17]     |  
| Sawtooth - Posts: 4285 | 
| 
                Try this: =NOW()-BARDATETIME>=4/1440 Note 1: The NOW function updates with the computer's DateTime, not the chart's DateTime. This means this won't work in Replay, only in real time in the current bar. Note 2: 4/1440 equals 4 minutes in SerialDateTime because there are 1440 minutes in 24 hours. See this for a more complete countdown alert study: https://www.sawtoothtrade.com/free-stuff-11.html  | 
        
|   [2023-06-23 14:07:56]     |  
| fuzzy - Posts: 7 | 
| 
                It works! Thank you so much.  | 
        
To post a message in this thread, you need to log in with your Sierra Chart account:
