Download MetaTrader 5

Where do I start learning to build a robot?

To add comments, please log in or register
Hello all, I have been trading forex for a while, but would like to get into using robots and building my own. My broker is and they dont use mt5 yet I think. Anyway, how can I begin to start learning how to code automated robots? Where to start? Any suggestions or help would be appreciated. 
Carl Schreiber
Carl Schreiber  

I would suggest you: take an existing EA (there are two coming with the installation or dld one from the code base) and try to add another indicator as additional filter.

If you have a problem don't ask here in the forum first - you'll find an answer a lot faster if you:

  1. Use the help (F1, mark a mql4 function + F1, F1+Index-tab Search keyword, ..) of the editor.
  2. Use the debugger: editor => Debug .. use enums instead of #defines as the debugger still can't deal with #defines :(
  3. Use either Comment(..) or Print(..) to see the values of the variables.
  4. Check the error number (_LastError) to find the root of the problem.
  5. Google! I assume that most of the problem you'll have other have had too and already solved them.
  6. Try to avoid graphical objects as trade trigger, use buffer or varaibales. Objects slow down the performance and the tester don't 'like' them.
  7. If you ask in the forum provide detailed information like what I did, expect, and got, the error number, code snippets, ...

Good luck!

PS: Before you start writing google for your trading idea! There practically nothing that has not been already coded for mt4.

Blahtech Limited
James Cater  

Good advise from Carl.

There are several high quality articles here

And also many coding examples from the user community here

To add comments, please log in or register