Technical Studies Reference
High/Low for Time Period | High/Low for Time Period - Extended
The High/Low for Time Period and High/Low for Time Period - Extended studies will draw lines in the chart for each day at the Highest price and at the Lowest price for the time spanning the Start Time to End Time study Inputs
With the High/Low for Time Period version of the study, the lines are only drawn from Start Time to End Time study Inputs. There is no consideration of the Session Times in Chart >> Chart Settings.
With the High/Low for Time Period - Extended version of the study, the lines will be drawn beginning at the Start Time study Input and go to the specified Stop Time Input. And then they extend without changing until the Line Stop Time Input (version 2004 and higher). The Stop Time Input can be later than Start Time in which case it is considered within the same trading day. Or Stop Time can be earlier than Start Time, in which case it is considered in the next trading day.
This study is typically used to draw the Opening Range across the day in the chart or to draw the overnight session High and Low on the Day session.
If you need to draw lines on an Intraday chart for the current day that represent the highest High and the lowest Low for the day, then you will want to use the Daily OHLC study and set the Reference Days Back Input with that study to 0.
The Start Time and End Time Inputs can specify times which are within the times of a chart bar, but the actual High and Low used will be based upon the visible bars.
For example, if the chart bars are of a 1 Hour timeframe and you have specified a Start Time and End Time that spans 15 minutes only, then because this amount of time is within a 1 Hour chart bar, the lines will be based upon the High and the Low of the 1 Hour bar that contains the specified 15 minutes.
Related to the above, when using Number of Trades, Volume, Range, Reversal, Renko, Delta Volume, Price Change, Point and Figure Bars, those chart bars which contain the specified time range (Start Time and End Time), even if only partially, are going to be used in the calculation. The actual High and Low of the bars will be used. This is something to keep in mind because the result will not be exactly as you expect.
- Start Time: This is the start time that you want to determine the High and Low prices from. This can be later than the End Time. If it is later than the End Time, then it is considered in the prior day. The Start Time must be within the time range of the Session Times, otherwise no lines may be displayed.
- End Time: This is the end time that you want to determine the High and Low prices to. This can be earlier than the Start Time and in which case it will be in the prior day. The High/Low bar values at this specific time are included.
- Input Data High: This can be changed from the default and set to the particular Study Subgraph to use as the High when this study is based on another study. For further information, refer to Input Data.
- Input Data Low: This can be changed from the default and set to the particular Study Subgraph to use as the Low when this study is based on another study. For further information, refer to Input Data.
- Display High and Low Incrementally: When this Input is set to Yes, then the High and Low at each bar represent the highest high and lowest low that have occurred from the Start Time up until and including that bar. Rather than there being a consistent highest high and lowest low spanning all the bars from the Start Time to the End Time.
- Number of Days to Calculate: The default for this input is 10000 and means that the High/Low for Time Period Subgraph lines will be calculated and displayed for up to 10000 days from the last date in the chart. Reduce this number to what you require if you just want to calculate and display the lines on a fewer number of days.
- Line Stop Time: This Input only applies to the High/Low for Time Period - Extended study. This specifies the time the High/Low lines stop at in the chart.
Using the High/Low For Time Period Study on Another Study
It is supported to base the High/Low For Time Period study on another study in order to determine the Highest and Lowest values for a specific period of time for the other study it is based on.
To accomplish this, set the Based on setting in the Study Settings window to the other study that you want to base the study on. After basing the study High/Low For Time Period on the other study, it is necessary to set the Input Data High and the Input Data Low Inputs correctly according to the study it is based on.
Also, set the Chart Region setting to the same chart region that contains the study you are basing the High/Low For Time Period study on.
Using the Study on Chart Bars That Contain Start/End Times In Between Bars
In order for the High/Low For Time Period study to be 100% accurate, it is necessary that the Start Time and the End Time Inputs with this study are times which match exactly the beginning and ending times of the chart bars that contain those times since the bar Highs and Lows are used and not values between those.
In order to display the High/Low bars on a chart that does not have the bars matching the Start Time and End Time of the bars in the chart (i.e. displaying the bars from a higher timeframe chart to a lower timeframe chart), then it is necessary to put this study on a chart that has the correct times and then use the Study/Price Overlay study to display the bars on the a different chart.
To accomplish this, follow these guidelines:
- Duplicate the chart that contains the symbol for which the High/Low bars study is to be displayed. This means that two charts are now available with the same symbol.
- Add the High/Low for Time Period - Extended study to one of the charts and set the Inputs as desired.
- On the chart with the High/Low study, change the Session Start Time, Session End Time, Bar Period Type and Bar Period Type Setting on the Chart >> Chart Settings page are set to values that will ensure that the bars of the chart will match to the entered Start Time and End Time of the High/Low study.
For example, if the Start Time and End Time Inputs for this study are set to 09:30:00 and 13:02:00 then the Session Start Time and Session End Time should be set to these values and the Bar Period Type should be Days-Min-Secs per Bar with settings of 0-2-0 in order to get 2 minute bars.
- On the other chart, add the Study/Price Overlay study and set the Study to Overlay Input to the chart and Study of the High/Low for Time Period. In order to display the High/Low bars on the Main Price Graph, be sure to set the Chart Region to 1.
Setting an Alert for New High or Low
This study can be used to produce a notification when there is a new High or new Low at the most recent bar. To accomplish this, follow these steps:
- Add the High/Low for Time Period or High/Low for Time Period - Extended study to the chart. For more information on how to add a study to a chart, refer to Adding/Modifying Chart Studies.
- Set the Input settings as needed for this study.
- Select the Alerts tab on the Study Settings window and enter the following formula:
=OR(ID1.SG1 > ID1.SG1[-1], ID1.SG2 < ID1.SG2[-1])
This formula assumes that the High/Low for Time Period study has the ID of 1. Change the ID1 as required to reflect the ID of the this study in the list of Chart Studies.
- Ensure that the Enabled button is selected on the Alerts tab.
- In order to reset the Alert condition after it has been triggered by a new High or Low and will therefore alert on the next new High or Low, enable the Reset Alert Condition on New Bar option.
- In order to only be alerted once per bar, enable the option Alert Once per Bar.
- Select OK to close the Study Settings window.
- Select OK to close the Chart Studies Window (if necessary) and have the chart display the study.
*Last modified Monday, 28th October, 2019.