EMA Cross EA how to add distance between cross?

 
double MA1 = iMA(NULL, 0, 5, 0, MODE_EMA, PRICE_CLOSE, 0);
double MA2 = iMA(NULL, 0, 15, 0, MODE_EMA, PRICE_CLOSE, 0);

if (MA1 > MA2 && ....)
{
Buy=true;
}


how can I add a min. distance fex. in points after the cross and what would be the best way?

signal should be triggered only if the distance between the lines is sufficient


ema

 
fulltilt: how can I add a min. distance fex. in points after the cross and what would be the best way?
if (MA1 > MA2 && ....)
if (MA1 > MA2 + MinDistance * pips2dbl)