Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 16:05:24 +0000



Study that will draw horizontal lines?

View Count: 1654

[2022-07-24 16:35:07]
User621878 - Posts: 13
Looking for a study that will draw horizontal lines. I found that the Spreadsheet Study will take my code and produce the desired results, except that I don't see any options under Draw Style for horizontal lines or horizontal rays. Using Dash works, but I was hoping for a horizontal ray instead. Any suggestions?
[2022-07-24 16:56:02]
User431178 - Posts: 614
You could try
Line Extend to Edge
Or
Stair Step Extend to Edge
[2022-07-24 18:25:54]
User621878 - Posts: 13
Line Extend to Edge and Line both just draw a line connecting the dots at each point to the next one. With Stair Step and Stair Step to Edge I only get a dash. I already have gone through the Draw Style options.
[2022-07-25 15:35:18]
John - SC Support - Posts: 38678
How exactly do you want to see the information?

If you are wanting a separate line for each point at which there is a different value, then you would need to change your spreadsheet to have a single value and then use multiple columns to have the individual values you want and then display those individual columns using the Subgraphs that reference them.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-07-25 20:15:13]
User621878 - Posts: 13
Thank you for your reply.
With Spreadsheet Study I am not having a problem with getting the correct values outputted from the formula cells for each Subgraph. When I choose Dash under Draw Style options, the dashes are right where they are supposed to be. If I choose Line for Draw Style, A line will be drawn from one value point to the next value point. I would like to have a horizontal line drawn from each value point to the right edge(horizontal ray). There are no options for Horizontal Line or Horizontal Ray in the Draw Style options, so I guess I won't be able to do this with existing studies. I have seen those options listed under ACSIL Drawing Tools, but that is beyond what I could do, at least for now.
Normally I just use the Horizontal Ray tool to draw lines, but experimenting with shorter time frame bars, it can take too long to make a line and choose the right configuration.
[2022-07-25 21:55:37]
John - SC Support - Posts: 38678
To do what you want, you would need to have each bar that has a line that you want to draw from it be within it's own column in the Spreadsheet Study. Then the line will be drawn all the way across the bars. You will be limited to 60 lines, as that is the maximum number of Subgraphs.

We are not sure exactly how you would put this together in the Spreadsheet, as it depends on how your data is. But if you had different data at every bar, then you could use something like the following, assuming that your data is in the K column:
=CHOOSE(COLUMN(), K$3:K$200)
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2022-07-28 16:06:00]
User621878 - Posts: 13
I appreciate your reply, it has made me take another look at how to use the Spreadsheet Study.

I am using regular price bars with a formula looking at the last 4 or more closed bars for a pattern. A True value will be a cell reference to the high, low or close of one of the closed bars. I was hoping to get a horizonal ray drawn from that point.

The good news is I did come up with a formula to lock the cell value to the first True value, which does generate an apparent line. The bad news is the formula locks the value to the first True value, which means I can only get one line which will be drawn from a formula, which be from the first True value. Edit: I did come up with a formula that will allow additional value lines to be drawn from same formula.

I did find a workaround by putting one formula (not the lock value one) in K3, then putting =K3 in the next 12 cells to the right, giving me 13 cells with the same value. All the cells have the same subgraph settings except for one, Displacement. I set the first cell, K3, to Displacement value 0, then each cell to the right I added an additional 2 to the Displacement value, giving me a dotted horizontal line to the right side. This is fine for now.

Again, thanks for your comments.
Date Time Of Last Edit: 2022-07-28 16:09:29

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

Login

Login Page - Create Account