hhigh(Num Bars, Min Bars, Num Formulas, Of What, Num Bars Ago) Num Bars = -1 for All Bars; Min Bars = 0 (false), 1 (true)
The highest high function will find the highest value over the number of bars you specify. If you are using Designer Dialogs, a dialog box will appear where you must enter the number of periods for the highest high. You can either enter the number of desired bars, or you can click the All Bars option.
If the all bars option is checked, it will find the highest high for all of the preceding values in the file. For example, if you wanted to find the highest volume in a file, you would enter “v” or “vol” in the Of What parameter (after you’ve closed the dialog box).
If you don't check the all bars check box, the highest high function will just find the highest high for the number of periods you specify. For example, if you wanted an indicator that was the highest volume of the last three bars, you would enter three in the number of periods edit box, and then enter “v” or “vol” in the Of What parameter.
You then must enter the number of bars ago value.
Finally, you can click the Must Have Minimum Bars checkbox. If the indicator you are designing must have at least a certain number of bars for its calculation, check this box. For example, in our first example where we wanted to find the highest volume in a file, we would not check this box, since we don’t need a minimum number of bars. (Actually, if you check the All Bars checkbox, the Must Have Minimum Bars checkbox will be ignored). However, for our highest volume of the last three bars, we would check the Must Have Minimum Bars checkbox, since we need at least three bars for the indicator. If this box was not checked, the indicator’s value for the first bar would be the volume for that bar. The indicator’s value for the second bar would be the either the first or second bar’s volume, whichever is higher. Finally, we would get an accurate value on the third bar.
Warning: the highest high function will do exactly what it is told to do. Let’s say we want the highest true range of the first 14 bars on a chart. We would require a highest high of the first 14 bars true ranges with the Must Have Minimum Bars checkbox checked, right? Wrong. To calculate the true range of a bar, we need at least 2 bars, the current bar and the previous bar. To calculate the highest true range of the first fourteen bars, you need a highest high of 13 bars true ranges with the Must Have Minimum Bars checkbox checked, since you cannot calculate the true range of the first bar in the file.
If you are not using the Designer Dialog boxes, in the text editor you would first type in the number of bars you want. You would enter -1 if you wanted all of the bars. You would enter 1 in the second parameter if you wanted the minimum number of bars or 0 if you didn’t want the minimum number of bars. The third parameter tells Investigator the number of Of What parameters that will be entered. In most cases, this value will be 1. Let’s say that you want to find the highest volume on a chart:
hhigh(-1, 1, 1, vol(), 0)
The third parameter is 1, since we are looking for just the volume. Let’s now assume we want the find the highest volume or the highest On Balance Volume value:
hhigh(-1, 1, 2, vol(), obv(), 0)
The third parameter is 2, since we are looking for two items. Finally, you enter the number of bars ago value.