Support Board
Date/Time: Thu, 31 Oct 2024 12:15:19 +0000
Post From: Auto Calculate Horizontal Lines as % of Prior Month/Weeks Range
[2024-10-17 15:32:49] |
John - SC Support - Posts: 35639 |
The way to automate this is to do the following: - Add as many copies of the "Period OHLC - Variable Period" to your chart to cover the time frames for which you want to determine the range. For instance, one copy for the previous week and one copy for the previous month. Make sure to set the Input for "Use Current Period" to "No" in order to get the previous period's information. You can hide this study, as you will not need it displayed. - Add the "Spreadsheet Study" to the chart. Within the Spreadsheet Study the data for other studies are displayed starting in column AA (by default). Therefore, you can then reference that information in a calculation column and get your desired lines. For example, the formula to place a line at 25% of the previous range would look like the following in cell K3: =((ID1.SG2@$3 - ID1.SG3@$3) * .25) + ID1.SG3@$3 Where ID1 is the ID of one of the Period OHLC - Variable Period studies. SG2 is the High subgraph of the Period OHLC - Variable Period study, SG3 is the Low of the Period OHLC - Variable Period. The @$3 is an explicit reference to row three of the study. Refer to the following: Previous/Period OHLC-Variable Period Working with Spreadsheets For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |