GetSeriesHighestValue
The GetSeriesHighestValue() method searches within a predetermined number of periods for the highest bar and outputs how many bars ago it can be found.
period Number of bars within which the bar is searched for
series Every data series, such as close, high, low, etc.
int barsAgo How many bars ago the high occurred
GetSeriesHighestValue(IDataSeries series, int period)
// How many bars ago was the highest high for the current session?
Print(GetSeriesHighestValue(High, Bars.BarsCountForSession - 1));
// What value did the market price have at the highest high of the session?
Print("The highest price for the session was: " + Open[GetSeriesHighestValue(High, Bars.BarsCountForSession - 1)]);
Last modified 3yr ago