Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 09:29:47 +0000



How to refer to time range in "color bar based on alert condition"

View Count: 1844

[2019-08-14 18:21:20]
User427934 - Posts: 4
So I have a study "color bar based on alert condition" with few conditions. I need to add a specific time range/time of the day restriction ( let's say, and(time>0930, time<1000)). How can i refer to the specific time of the session? Appreciate the help!
[2019-08-14 19:36:27]
John - SC Support - Posts: 30444
The pieces you need are BARTIME and TIME(hh, mm, ss). Where BARTIME gives you the opening time of the bar and TIME converts the specific time you specify to the proper format for comparison.

So if you wanted to have a condition where the bar's opening time is after 09:30, you would enter the following:
=BARTIME > TIME(09, 30, 00)

You need to specify the hour, minutes and seconds, even if they are zero.

Refer to the information at the following two links:
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables
https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#TIME_Function
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2019-08-17 23:06:12

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account