Identifying Moving Average Candle crossover

 

Hi all,  

I am using MQL4 and I want to know that how to identify that Moving Average line has crossed candle.

I tried using iMA() method but I think it returns moving average value not the  current price

Please tell me what method or logic I can use to identify Moving Average Candle crossover.

 

Thanks.