Guest User | Sign In

Knowledge Base

HighestHigh Function

The HighestHigh() scripting function can be used to determine the highest high values over a specified period or date range. It can be used on both prices and indicator values.

For example, the highest high price over the last 52 weeks:

HIGHESTHIGH(BARS=52, BACKTYPE=Weeks, INCBAR=True)

When applied to a Show Plot the formula will draw the highest 52 week high:


The properties for this function include:

Properties


Tool Name: Allows you to adjust the name of the tool, as it's displayed in the Structure Panel.

Range: This allows you to select between the All Time High, a specified Look Back Period or Range. When Range is selected chose the start and end dates and the result would be the highest value between those dates.

Look Back Type: When Range is set to Look Back Period, this property will display. You can set the value to Bars, Days, Weeks, Months, or Years.

Look Back Amount: When Range is set to Look Back Period, this property will display. You set the value of the number of Bars / Days / etc you want the function to use. For example, if the Look Back Type was set to Months, and the Look Back Amount was set to 3, the function would return the highest value from the last 3 months of data.

Include Inside Bar: When Range is set to Look Back Period, this property will display. This checkbox will determine whether inside bars are counted in the look back period. An inside bar is classified as a bar where the high is lower than the previous bars high, and the low is higher than the previous bars low.

Include Current Bar: This checkbox will determine whether the last bar is counted in the look back period. If your script is being used to look for breakouts, this checkbox should be unticked (see below).

Allow Equal To: This checkbox will determine whether an Equal High value is considered to be a new Highest High or not.

Signal Only: This checkbox will determine whether the script will show a dynamic value across the entire historical data set, or reflect only the last value from the latest bar.

Timeframe: Allows you to adjust the time frame the script is working on (Daily, Weekly, Monthly Data, etc).

Example Scripts


Highest 6 month closing high. Bty default the highest high price will be returned, but other prices can be nested in the formula, eg CLOSE().


HIGHESTHIGH(CLOSE(), BARS=6, BACKTYPE=Months, INCBAR=True)

When added to a Show Plot the high prices will be ignored, with only the closing values being plotted:




Is today a new 22 day high? Use the following in a a scan or Watchlist column. Note that unlike the other examples the Include Current Bar option should not be applied.

HIGH()>HIGHESTHIGH(BARS=22)

What was the highest high between June 1st 2017 and June 1st 2018? Use the Range option to specify the start and end dates of the range:

HIGHESTHIGH(RANGE=Range, RANGESTART=2017-06-01, RANGEEND=2018-06-01)



What's the highest RSI(5) value over the last month?
This can be calculated by nesting the RSI() function in the HighestHigh:

HIGHESTHIGH(RSI(BARS=5), BACKTYPE=Months, BARS=1, INCBAR=True)

 Last updated Fri, Jan 11 2019 7:37am

Please Wait!

Please wait... it will take a second!