EMA EA Question

 

Hello guys,

I'm quite new to this and I have a few questions regarding the Way an EMA EA works.

I've downloaded an EMA EA written by Coders Guru From here:

http://www.forexmt4.com/_MT4_Experts/EMA_CROSS_2_RonModV7mini.mq4

After trying out different values I've managed to receive these results (using back testing):

Although I'm happy with these results I've noticed two things that bothered me when watching the chart that was generated by the back tester:

1) I've noticed that some trades occurred without a cross of the MAs as seen on this picture:

What is the reason for this? Is it connected to the shift parameter that can be set in the iMA function? (As in we can only know that a cross has occurred after the time period is finished so I need to set a shift of 1 period so It'll work as intended?).

2) In some places there are clusters of 10-20 trades like here:

Do you guys know what is the reason for this and how it can be prevented?

(This "clustering" happened to me when I was live testing (demo account) another EA as well).

Thanks in advance, Drue.

 

*Bump*

Are you guys familiar with the "Clustering" of trades that I've encountered?

Is there an explanation to this?

 

When I wrote some MA Ea's, I noticed that if a price was bouncing near the longer MA, the shorter MA would cross it several times.

To solve that I just took the last period's MA's and see if they crossed, because that won't change.

Jeff.