pdrhParticipant
Average
I want to find if a condition has been met in the last few bars .
Is there something similar to Lowest[N](close ) or could somebody give a code to do this .
a = summation[5](close > close[1])
“a” will contain how many times the condition “close > close[1]” was met within the last 5 bars
pdrhParticipant
Average
what I am wanting to find whether an as yet undefined condition has been met in the last few bars.
you mean like, have any unicorns been discovered within last 5 bars?
you have to tell the summation what to look for (unless i have completely misunderstood ???)
pdrhParticipant
Average
I wanted to find when the price is rejected at a resistance level more than once and this gave a result
a=supertrend[3,10]
b=a-close
ind=0
If b<2.5 AND b>0 Then
ind=1
Endif
d=summation[7](ind)
Return d
You should now use that new instruction: BARSSINCE ! Enjoy.