SebParticipant
Average
Hello Everyone,
I am able to return the lowest low of the previous 10 bars with the code “lowest[10](low)”. What I would like to do is count the number of bars since that low. Anybody an idea?
I did not test it, but it should do:
LowestPrice = lowest[10](low) //save the lowest price returned
LowBar = 0
for i = 1 to 10 //scan the previous 10 bars
if low[i] = LowestPrice then
LowBar = i //when the match is found save te number of the bar
endif
next
//from now on you know LowBar IS the bar within the 10 previous ones with the lowst price
// (unless more than one shares the same lowest price!!!)
PriceRange = range[LowBar] //you can, just as an example, access the RANGE of the bar with the lowest low....
Let me know if you are having problems with that piece of code.
Roberto