Support Board
Date/Time: Fri, 09 May 2025 14:12:13 +0000
Alert During Specific Time Period
View Count: 882
[2015-12-22 18:04:12] |
Halco - Posts: 92 |
I have an alert I want to display only 16:00 to 2:59 - =AND((ID1.SG1>150),BARTIME >= ((16*60+00)/(24*60)), BARTIME <= ((02*60+59)/(24*60))) Written like this the alert does not show up at all. If I change the second time to 23:59 - =AND((ID1.SG1>150),BARTIME >= ((16*60+00)/(24*60)), BARTIME <= ((23*60+59)/(24*60))) the alert does show up during those times. The syntax in the first version, the one that doesn't work, appears to be the same as the one that does work. Is there perhaps some setting or something that is causing the first version not to work? Thanks! |
[2015-12-22 18:26:03] |
Sawtooth - Posts: 4213 |
It's easier to use the TIMEVALUE function than arithmetic. And since you're crossing midnight, use OR instead of AND for the time window. Try this: =AND(ID1.SG1>150,OR(BARTIME >= TIMEVALUE("16:00:00"),BARTIME <= TIMEVALUE("02:59:59"))) |
[2015-12-22 18:45:31] |
Halco - Posts: 92 |
That did it. You're the man, Tom. Thanks much.
|
To post a message in this thread, you need to log in with your Sierra Chart account: