Coding a cross

 
Trying to code when EMA5 crosses above EMA10 for an Expert Advisor Program and I'm stuck.  I can use ArrayMaximum and ArrayMinimum function to some affect but that just tells if the values are greater than or less not if it crossed.  Thoughts?
 
modify MACD Sample
Reason: