Support Board
Date/Time: Sat, 20 Jun 2026 16:57:48 +0000
Horizontal Line at Time - How do I set it to display closing prices?
View Count: 200
| [2026-04-28 07:32:00] |
| Deenius - Posts: 113 |
|
Hello, I’m trying to get a line to appear on the chart that marks the market closing price at 4:15 PM. I want the line to be drawn from the bar's closing price at 4:15 PM, regardless of whether I’m currently on a 15-minute, 5-minute, or 1-minute chart. I’m using the Horizontal Line at Time study, but I can’t get it to display the closing price the way I want. My settings are shown in the screenshot. I set the price to Last and the start time to 4:14:59 PM. However, based on my settings, the study always displays the closing price of the first bar following 4:15 PM. This means that on the 1-minute chart, it shows the closing price at 16:16; on the 5-minute chart at 16:20; and on the 15-minute chart at 16:30. Could you please advise me on how to set this up correctly so that the study displays the market closing price at 4:15 PM? Thank you |
| |
| [2026-04-28 14:39:02] |
| Sierra_Chart Engineering - Posts: 24077 |
|
Use the attached Study Collection. This is the closest we can configure for what you want. Instructions: How to Use an Advanced Custom Study or a Study Collection Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
| |
| [2026-04-28 16:48:00] |
| Deenius - Posts: 113 |
|
Thank you for the proposed solution. I know that this study can be set to open at 4:15 PM. But that is usually not the exact closing price. I also wanted to display the closing price at 5:00 PM (4:59:59 PM) on the chart. In this case, the proposed solution won’t work at all, because once the market opens at 6:00 PM, the price will most likely be somewhere else entirely. Is there another solution that could display the actual closing prices? |
| [2026-04-28 18:38:38] |
| John - SC Support - Posts: 46802 |
|
Attached is another study collection that will do what you are wanting. It is setup to display the Close of a bar that contains a time of 15:14:59, so you may need to change the exact time for which you want to have the line drawn. The time is defined in the "Spreadsheet Formula" study that is hidden. It is also setup to only display the line if the time falls within yesterday or today, so you will not get a bunch of lines from previous days. Use what we have done in this study collection to add other lines as you want. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
| |
| [2026-04-28 20:56:10] |
| Deenius - Posts: 113 |
|
Thanks, John. I appreciate it. It works perfectly. I have three questions. 1. Can the formula be modified to ignore weekends? 2. Why can’t the Horizontal Line At Time indicator do this? 3. Your formula looks pretty simple. Would it be possible to integrate it into the HLAT study? I’m sure I’m not the only one who wants to display closing prices on the chart. Thank you. |
| [2026-04-28 21:27:05] |
| John - SC Support - Posts: 46802 |
|
1. Yes, you can do this. The easiest way would be to add the WEEKDAY() function into the AND statement to check the days you want and do not want. Refer to the following: https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#WEEKDAY_Function Just so you are aware, you would use this function like the following: WEEKDAY(BARDATE) Sundays return a value of 1, Monday 2, etc. 2. It just wasn't built that way. Nor were any of the other studies along these lines. What we did with the Spreadsheet Formula was to look for a bar that "contains" the time you want. 3. It's possible, but there are a lot of things to do. We have noted this as a Feature Request to add an option to the "Horizontal Line at Time" to have options for "Nearest" and "Containing" match like the "Study/Price Overlay". We can not say when we would get to any particular request. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
| [2026-04-29 06:53:06] |
| Deenius - Posts: 113 |
|
Thank you very much, John. I’m really glad to hear that you’ll be incorporating this into the study in the future. |
To post a message in this thread, you need to log in with your Sierra Chart account:
