Ciao Roberto
thank you for your answer.
I was not able to develop the code because I didn’t know the powerful sintax
HiVol = (Volume = highest[50](Volume))
Instead of HiVol = highest[50](Volume), is yours able to define the highest volume bar in such a dynamic way? Can you explain me it better?
Also I understood, I did not wrote very clear, my aim is actually to find the highest 3 bars in a period of 50 bars. Does your code do that, or simply it finds the first 3 bars going back to the past (and after it stops)? It seems so.
After getting these 3 bars, I also need to put them in ascending or descending order.
I know we can do that in the way below, but if I need more than 3 bars it becomes complicated:
if (a <= b) {
if (a <= c) {
if (b <= c) printf("%d %d %d\n", a, b, c);
else printf("%d %d %d\n", a, c, b);
} else printf("%d %d %d\n", c, a, b);
} else {
if (b <= c) {
if (a <= c) printf("%d %d %d\n", b, a, c);
else printf("%d %d %d\n", b, c, a);
} else printf("%d %d %d\n", c, b, a);
}
}
Sorry for the programming language but it is just to explain.
Grazie per l’aiuto
Roberto