[B]intx13’s MQL4 Beginner Tutorial[/B]
[I]Latest installment: 1[/I]
This thread will contain the installments of my tutorial on writing expert advisors in MQL4, the programming environment included in MetaTrader 4. This tutorial is aimed at people who are comfortable with forex, have some experience with technical analysis, but have little or no programming experience. Hopefully it will be useful for people that want to write their own expert advisor but don’t know where or how to start.
I’d love feedback - questions, comments, whatever - as I go along, but please don’t post them here. Start a new topic if you have a question or comment; please don’t put them in the middle of this thread or it will be tough to find each installment.
The installments will be written as I have the time (i.e. don’t hold your breath!). The tentative breakdown is as follows:
[B]1. Introduction to MQL4[/B]
[I]Topics:[/I]
[ul]
[li]Capabilities and limitations
[/li][li]The strategy tester
[/li][li]The programming environment
[/li][/ul]
[I]Code:[/I]
[ul]
[li]hello.mq4
[/li][/ul]
[B]2. Basic Concepts[/B]
[I]Topics:[/I]
[ul]
[li]Functions
[/li][li]Variables and variable types
[/li][li]If/else statements
[/li][li]The “Print” function
[/li][/ul]
[I]Code:[/I]
[ul]
[li]basics.mq4
[/li][/ul]
[B]3. Our First Real Expert Advisor[/B]
[I]Topics:[/I]
[ul]
[li]Constructing and sending orders
[/li][li]Implementing a simple strategy
[/li][/ul]
[I]Code:[/I]
[ul]
[li]ea_2run.mq4
[/li][/ul]
[B]4. Our Second Real Expert Advisor[/B]
[I]Topics:[/I]
[ul]
[li]Loops
[/li][li]Working with arrays
[/li][li]Closing orders manually
[/li][/ul]
[I]Code:[/I]
[ul]
[li]ea_nrun.mq4
[/li][/ul]
[B]5. Analyzing EA Performance[/B]
[I]Topics:[/I]
[ul]
[li]Open and close positions
[/li][li]Win/loss percentages
[/li][li]Using the performance graph
[/li][li]Training and overtraining
[/li][/ul]
[I]Code:[/I]
[ul]
[li]None
[/li][/ul]
[B]6. Our Third Real Expert Advisor[/B]
[I]Topics:[/I]
[ul]
[li]Indicators
[/li][li]Configurable expert advisors
[/li][/ul]
[I]Code:[/I]
[ul]
[li]ea_breakout.mq4
[/li][/ul]
[B]7. Codifying Your Strategy[/B]
[I]Topics:[/I]
[ul]
[li]Human trading and expert advisors
[/li][li]Converting strategy to code
[/li][/ul]
[I]Code:[/I]
[ul]
[li]None
[/li][/ul]
Interested in seeing some other stuff? Let me know! (But not in this thread, please!)