Check if condition is true in the last n bars
Posted: Thu Dec 24, 2020 11:32 am
Hi everyone i'm actually programming a really simple script that plots 1 column if close > BollingerBandBasis
Actually is working for all bars.
Now i just want to start plotting columns only if i get 20 consecutive close > BBbasis
How should i code this condition?
Thanks in advance.
Actually is working for all bars.
Now i just want to start plotting columns only if i get 20 consecutive close > BBbasis
How should i code this condition?
Thanks in advance.