the strategy doesn't close previous positions when a contrary brick is formed. And the strategy does not buy in the direction of the trend, rather, it always buys into the type of price that it's configured with.
Yep, it was a typo. The wrong brick size was used. Also, I applied some optimizations to the view. It still can't be optimized (not sure why yet). But it works in the simulator.