Returns the number of candlesticks passed since the last true condition.
1 |
BarsSince(Condition,Occurence) |
Syntax:
The occurrence parameter is optional and defaults to 0, it allows to search for the nth time the condition was true.
If no value, it will return the value -1.
Example:
1 2 3 4 5 6 |
a = rsi[14] crosses over 50 testA = barssince(a,1) testB = barssince(a) return testA as "previous occurrence", testB as "last occurence" |
Hi, is BarsSince instruction available in a Proscreener ?
I guess not…
I receive an error message “Merci de compléter la syntaxe de cette ligne” at the point start of the beginning of the instruction.
Thanks in advance for your response.
Hello , i face the same issue… Did you find the answer ? the
this operator would be handy. but its bloody slow . have to optimize
even run once in a hour long
a = openhour = 4
IF openhour openhour[1] then
testB = barssince(a)
endif
return testB as “last occurence”