Login Page - Create Account

Support Board


Date/Time: Fri, 23 May 2025 18:20:44 +0000



Simple average of 2 lines

View Count: 27

[2025-05-22 21:04:51]
smoothoperator - Posts: 3
Dear SC Team - apologies in advance if this question is very elementary OR has been asked before, been searching across the net but did not find a direct answer.

Is there a function or tool to draw 2 lines (levels) on a chart and have Sierra automatically provide the simple average value (price) of the 2 lines?
For example, one would chart a line towards the top of the chart and and another line towards the bottom of the chart, and SC would (auto) draw/show the midpoint (line)?
Been trying to play with TPO, but all those function seems too complexed for this simple task.

Thank you very much in advance and once again apologies if this question has been covered before. Warm regards!
[2025-05-22 21:25:40]
John - SC Support - Posts: 40011
There is not a specific option for exactly what you want, but there are ways to get the answer.

If you are only wanting straight lines, then the simplest option would be to use the Rectangle (or Extending Rectangle) tool. This allows you to set a top and bottom line and you can then display a Midline and show the value for that midline. Refer to the following:
Chart Drawing Tools: Rectangle | Extending Rectangle | Ellipse | Triangle

Another option, again with straight lines, would be to use the "Horizontal Lines" study to define the two lines and then use the "Study Subgraphs Average" study to get the average (or midpoint) of those two lines. Refer to the following:
Horizontal Lines

Study Subgraphs Average

Finally, an option where you do not need straight lines, but you may want to use in general in either case, would be to draw two lines at the levels you want (straight or otherwise) and then calculate the midpoint using the "Spreadsheet Formula" study by entering a formula like the following:
=(UDID[1][0] + UDID[2][0]) / 2

Where [1] and [2] are the IDs of the two lines. The [0]'s mean no offset in the calculations. Refer to the following:
Spreadsheet Formula

Study/Chart Alerts And Scanning: Reference by Bar Value
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:

Login

Login Page - Create Account