Support Board
Date/Time: Thu, 28 Nov 2024 03:44:16 +0000
[User Discussion] - Close price at a given time
View Count: 277
[2023-06-06 16:21:48] |
novaxt123 - Posts: 42 |
I want to draw an arrow on the chart over the Alarm Study. For this I need the close, for example, at 9 a.m. and at 10 a.m. What is the format for the alarm study for the close at a specific time?
|
[2023-06-06 16:59:47] |
John - SC Support - Posts: 36350 |
If you are asking how to set an alert to go off at a specific time, then the syntax for this would be the following: =AND(HOUR(BARTIME) = 9, MINUTE(BARTIME) = 0) This will give you an alert at 09:00. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-06-08 17:36:16] |
novaxt123 - Posts: 42 |
Hey John Thanks for the answer. No, I need the syntax for the close price of the bar at 09:00:00 for example. I want to compare the close price of 2 times. |
[2023-06-08 19:55:39] |
John - SC Support - Posts: 36350 |
You would have to use the Spreadsheet Study to do this and then use the same concept as we gave above within an IF statement where the value if True is the close. So the formula would look like the following in Row 3: =IF(AND(HOUR(A3) = 9, MINUTE(A3) = 0), ID0.SG4@3, IF(AND(HOUR(A3) = 10, MINUTE(A3) = 0), ID0.SG4@3, 0)) You would then need to use the EARLIESTNONZEROVALUE and MOSTRECENTNONZEROVALUE functions to get these two values to the 3rd row, where you can then do what you want with them. Note that this will only work with one day's worth of data in the spreadsheet. You will find the information for the functions here: Spreadsheet Functions 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: