Support Board
Date/Time: Tue, 01 Jul 2025 01:28:39 +0000
Color Bar Based on Alert Condition - Time Constraint?
View Count: 67
[2025-06-19 10:00:52] |
User753526 - Posts: 64 |
I am using the Color Bar Based on Alert Condition with the Alert code (C>(ABS(H-L)*.95)+L which works fine. However, is it possible to constrain this to only alert and display the alert on the chart between two times? 09.30 and 12.00?
|
[2025-06-19 16:11:33] |
John - SC Support - Posts: 40676 |
Time conditions are most easily entered by using the BARTIME and TIME() functions. Refer to the following: Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#TIME_Function For instance, to check if a bar opened after 09:30, you would enter the following: =BARTIME > TIME(09, 30, 00) To combine items, you need to use the AND() and/or OR() functions. Refer to the following: Study/Chart Alerts And Scanning: OR and AND Functions Therefore, to get what you want, your formula would be the following: =AND((C>(ABS(H-L)*.95)+L, BARTIME > TIME(09, 30, 00), BARTIME < TIME(12, 00, 00)) Note that you can change the Greater Than and Less Than to be Greater Than or Equal To, if you want to be inclusive the time (i.e. BARTIME >= TIME(09, 30, 00)) 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: