looking for help of new ea

 

hi, I got a new EA as above but something wrong.

I want to buy when MA38 cross MA140 and close it when MA7 cross MA38.

I test it on AUDCAD,M15 between 2012.04.25 to 2012.04.26.

It should buy at 12:15 and close at 16:00. But the result is it buy at 12:45 and close at 19:29.

Would you please kindly let me know what’s wrong and how to do?

Thanks a lot if help!

Files:
ma.mq4  5 kb
 
  1. How should we know. We don't have your broker and thus your chart. Nor do you specify if you've changed the EA settings. Add some Print statements for the variables and step through the bars with the tester and find out why!
  2. It opens when the middle and long lines cross. Are you sure you're reading it right?
  3. If you put the ea on multiple charts or open other orders it will close the last opened order not its order on its chart.
  4. it does NOT check return codes
 
WHRoeder:
  1. How should we know. We don't have your broker and thus your chart. Nor do you specify if you've changed the EA settings. Add some Print statements for the variables and step through the bars with the tester and find out why!
  2. It opens when the middle and long lines cross. Are you sure you're reading it right?
  3. If you put the ea on multiple charts or open other orders it will close the last opened order not its order on its chart.
  4. it does NOT check return codes


hi, whroeder,

thanks for your reply. i exactly want to do it when middle and long lines cross. but when test, i find the cross is different between it on the chart and on the "open the chart" after testing. I use Alpari UK MT4. I am new to forex and EA. Maybe I still have so many things that i don't understand. I still don't get the answer but really appreciate for your response. Attached, it is the picture that show the different of charts as above.