Further elaboration: there seems to be a problem with "crosses over", which is equal to: (X <= 30) and (X > 30). Using that code the X variable will be serialized (becoming a numerical series), but the "crosses over" reserved word doesn't do that - meaning that isn't not equal any more to the code it should represent.
I think it's a possible bug.
Let's imagine how the algorithm crosses works. At first glance, everything is simple - X <= 30) and (X > 30).
But what about "touching"? Two, three bars duration ... ? It is when X=31, X=30, X=30, X = 31. Is this the "crossover" or not?
I think that is not crossover. The "crosses over" algorithm checks all available "history window" (MaxBB) of study for detecting "touches" and "crosses". There for MaxBB of study affects on algorithm's results.
When you have accessed to X with barsback, you have activated auto-MaxBB mechanism and your study was have calculated with MaxBB = 6. That was enough for "crosses over" proper works.