MetaTrader Help - How to Write an Expert Advisor?

I am wondering if anyone knows of some sample code or a tutorial (not the MetaQuotes website with the lnguage definitions) on how to do the following:

1.) When MA(5) crosses EMA(21) speak a .wav file, or make a sound.

2.) Same as #1, but will also send an email to an email address.

I’m such a n00b, that I haven’t been able to figure that out for quite some time.

Thank you

well, metatrader has a manual with the lauguage. its sooooo boring an by the time i finsished reading the whole thing, i forgot most of it. lol. i would also like to know if there is a video or easier tutorial.

Thank you Honey Bee. I asked the Metatrader Yahoo Group also, and received the advice to look in the Tutorials and FAQ section of Index of /forex

I will post my studies here when I get a chance to review the lessons.

Thanks again -

Scott

learning how to built EA is very difficult sir,
It can kill your time, just make order to EA builder, your own EA will be create quickly…

For such a simple strategy you can use a graphical EA builder. Instead of code you build a flow diagram, like Simulink in Matlab. Alpari provides one to its clients but there are more. Google it.

Hello pipmeister,

I read your post and as a programmer with a decade of experience I felt compelled to help you out a bit,

If you really are a newbie to programming I would really suggest:

[B]Don’t go for MQL straight ahead.[/B]

You would probably ask “Why not?”

First of all the MQL language is written by the people who write MT. And you cannot expect a full-time programmer to be a great teacher, nor to be a great language creator. In the real world programming languages are being developed by teams of people who dedicate to the single purpose of writing a language. There are other people who are dedicated to teaching programming. This is why the MQL tutorials won’t give you any good base for programming anything, since MQL has it’s flaws and the people who teach it, do not actually have an idea of how to teach it.

I suggest you take a course in C++ (C++ is a mature programming language and MQL is based on C++ and very very similar to it – let’s say 95%). This will allow you to get how MQL works and how it can be helpful to you.

This one seems good - C++ Training, Language & Library Jump Start - Microsoft Virtual Academy

After you are done with the course - you can go for MQL. Going trough the course will save you a lot of time and frustration.