Download MetaTrader 5

EMA Cross EA how to add distance between cross?

To add comments, please log in or register
Interested in traders' opinion? Arrange a poll on the Forum!
fulltilt
372
fulltilt 2014.09.11 10:20 
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

whroeder1
14470
whroeder1 2014.09.11 12:32  
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)
To add comments, please log in or register