I wrote a small script which identifies days HIGH & days LOW, this part is working fine.
In the next step, I am trying to get barcount from the Day's HIGH and days LOW occurrences.
Though the barcounts from d's HIGH & d's LOW are different, the script returning value of the first occurrence for both.
For debugging, screenshot given :
First line was not copied. Giving the piece of code again.
How about using HighestSince and LowestSince?
y=HighestSince( x, H );
p=LowestSince(x, L );
hbar = HighestSinceBars(x,H) ;
lbars = LowestSinceBars(x, L);
Thank you very much.