Randomly...
This is how I made it initially, and it's the same way today. If you cross MA5 and MA20 with x>, the conditions are these:
MA5[0] > MA20[0] and MA5[1] < MA20[1]
where 0 and 1 are candle id's.
This works for indicators, because each indicator has 1 value per candle. It becomes a little bit weird when candle data is used:
Close[0] > MA[0] and Close[1] < MA[1]
Here it will be more correct if Close[1] is Open[0] instead. But in "Condition" is not. That's why I created 2 more blocks for price crossovers, which work in a little bit different way - they detect when the price crosses some value, but using data from the current tick and the previous tick.