Returns the position of the highest value of the price over a look back period.
An integer which represent the number of periods (over the look back period) in which the highest value occurs.
If there are two prices with the same highest value over the period considered then the position of the most recent highest price is returned.
We illustrate the application of this method with the following example. If the prices over the past five periods are: { 102, 101, 100, 103, 102 }, and the look back period has 3 periods, then the position of the highest is 1, corresponding to 103, which is the highest value within { 101, 100, 103, 102 }.
| Exception Type | Condition |
|---|---|
| ArgumentException | Thrown if prices array has strictly negative elements or if the noOfPeriods argument is greater then the length of prices array. |
Momentum Class | WebCab.COM.Finance.Trading.Indicators Namespace