@ferford The easiest way to do it is by using two consecutive blocks. For a buy:
Low price of candle Id 0 is BELOW (not crossing) the 20 period envelopes and...
Close price of candle ID 0 is ABOVE (not crossing) the 20 period envelopes.
Thanks for answering. I was checking and I have the candle set to 1, both for the opening condition and for the closing condition. What I will try now is to use what you have told me: "one per bar", and I'll tell you later if it works