I am working in Ninjatrader script to find within a bar where a certain price resides. So far I have a value "price" that is one of the values in a list. So within the bar there are x number of prices from Low to High I use a for loop to find those values. I need the list to be sorted High to Low. The count will vary from bar to bar. So say I have 16 values in the list. I need to determine the top 3rd, middle 3rd and bottom third of those values then once determined to compare the certain "price" as to which third it resides. the count will vary and wont be cleanly divisible by 3.
for ( double myPrice = Low[0]; myPrice = High[0]; myPrice += Ticksize)
{
myList.Add(myPrice);
}
From here I need to figure out how to divide list into thirds, then check if ABC_Price is in the top, middle or bottom third of the list, with list sorted High to Low.