Yes, you asked how to ensure the price had crossed the moving average a lot and in most circumstances that means the condition is met by a later candle than if you just wanted the moment the moving average was actually crossed.
@mrfilthy11 Please remember that 'crossing' is not a real thing in MT4. What a human observer can see as a two lines crossing on chart doesn't have a mathematical reality behind. Lines are formed by dots on each candle position. That means a 'crossing' happens when values of both lines are one above the other when compared to the previous candle. Crossings are visual artifacts in MT4/5.