"Highest" Function / BarNumber

Questions about MultiCharts and user contributed studies.
User avatar
Gargoyle
Posts: 92
Joined: 18 May 2014
Has thanked: 7 times
Been thanked: 5 times

"Highest" Function / BarNumber

Postby Gargoyle » 28 Jan 2016

Hello everybody,

While using the function "Highest" in Easy Language, is it possible to get the BarNumber of the specific bar that contains the "highest" price, of the N bars ago I select in this function?

My goal is to take the Bar ID of that bar, which has the highest price...

Thank you very much!

User avatar
TJ
Posts: 7158
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 988 times
Been thanked: 2042 times

Re: "Highest" Function / BarNumber

Postby TJ » 28 Jan 2016

Hello everybody,

While using the function "Highest" in Easy Language, is it possible to get the BarNumber of the specific bar that contains the "highest" price, of the N bars ago I select in this function?

My goal is to take the Bar ID of that bar, which has the highest price...

Thank you very much!
Look up the function

MRO

User avatar
ABC
Posts: 626
Joined: 16 Dec 2006
Has thanked: 119 times
Been thanked: 355 times
Contact:

Re: "Highest" Function / BarNumber

Postby ABC » 31 Jan 2016

When you take a look at the Highest function code, you'll see that it just calls another function called Extremes. The latter returns both the value and the bar number of the occurrence (in bars back from the current bar!).
You can implement the function in your code exactly like the highest function does and get both values you are looking for.

Regards,
ABC


Return to “MultiCharts”