Price + EMA

 

Hi all,

I suppose what I need already exist but I could not find it.

I need just need to know the code to detect when the price cross an EMA (in my case EMA's 62, 200 and 800).

Thanks a lot in advance!

 
double MA62Daily = iMA(NULL,PERIOD_D1,62,0,MODE_EMA,PRICE_CLOSE,0);
if (MarketInfo(Symbol(), MODE_ASK) > MA62Daily)
   {
   //do someting
   }