Suppose I have a pinescript series current
that looks like this;
current = [1 0 0 1 0 0 1 0 0 1]
I want to shift this series backward by 1. The shifted
variable will look like this;
shifted = [1 0 0 1 0 0 1 0 0 1 0]
The last sample of shifted
will always be 0
.
I am using pinescript v5