Hi, Is there any function for finding the 'N'th highest price in M days?
Steven
Function for finding the 'N'th highest price in M days
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Function for finding the 'N'th highest price in M days
Hi, Is there any function for finding the 'N'th highest price in M days?
Steven
can you post a diagram to illustrate?
Re: Function for finding the 'N'th highest price in M days
Hi TJ,
For example, we have a function named highest(c, n) which will show the highest close of N bars, My question is: have we had another function which will show the second highest close of N bars, like highest2(c,n,2).
Steven
For example, we have a function named highest(c, n) which will show the highest close of N bars, My question is: have we had another function which will show the second highest close of N bars, like highest2(c,n,2).
Steven
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Function for finding the 'N'th highest price in M days
Hi Steven,Hi TJ,
For example, we have a function named highest(c, n) which will show the highest close of N bars, My question is: have we had another function which will show the second highest close of N bars, like highest2(c,n,2).
Steven
You have to create an array with N Highest close and then sort them to have the second N highest close. In this way you can have all the N highest close from the first to the last, ordered and you can retrive them. You can do this with all the quotes you need, close, high, low, volume, range and so on.
- CrazyNasdaq
- Posts: 321
- Joined: 02 Sep 2009
- Location: ITALY
- Has thanked: 98 times
- Been thanked: 89 times
Re: Function for finding the 'N'th highest price in M days
You are welcome Steve.Got it, Thanks CrazyNasdaq and TJ.
Steve