
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What programming experience do you have?
Why do you feel you can dive right in to modifying a progam without first learning the language
When you try to use the metatrader language do you check the syntax against the doumentation ?
just vb 6.0 only...
i had bought an expertadvisor programming book,
from http://expertadvisorbook.com/
but not yet receive,
so right now start to learn it.
step by step from modifying exist ea first before create my ownself ea.
try to learn from all the mistake which i made.
So the first thing you need to understand is that the syntax of the mlq language is very different from VB so you can't just write VB and expect it to work the same.
Second thing you need to understand is the basic inputs and outputs of mlq.
Third thing is to understand the special functions init() start() deinit() and what a function is.
So start to start writing your new ea lets begin with opening the editor and seeing the outline of a mlq program.
Sorry if this sounds patronising but its easier to teach a child as you can assume they don't know anything where adults can jump in with background assumptions based on experience.
Here is the simplest blank mlq program you can make. You can compile it and add it to a chart and see the smilely face in the top right hand corner.
Everything you do when writing code must follow this syntax
that is:- the type of number the function returns the name of the function with the () following THEN the curly brackets {}. that enclose a block of codeThis program introduces the end of line concept. A line of code can cover more than one line so the end of the line of code is represented by the semi-colon ;
Comment is a function that has string and number variables separated by a comma as its parameters. Comment outputs information to the chart window the ea is placed on. You can use this to see if your trigger code is working as expected.
Exercise: look up the if statement and have it write two different comments to the screen depending on the Ask price being above or below a manually entered price.
So the first thing you need to understand is that the syntax of the mlq language is very different from VB so you can't just write VB and expect it to work the same.
Second thing you need to understand is the basic inputs and outputs of mlq.
Third thing is to understand the special functions init() start() deinit() and what a function is.
So start to start writing your new ea lets begin with opening the editor and seeing the outline of a mlq program.
Sorry if this sounds patronising but its easier to teach a child as you can assume they don't know anything where adults can jump in with background assumptions based on experience.
Here is the simplest blank mlq program you can make. You can compile it and add it to a chart and see the smilely face in the top right hand corner.
Everything you do when writing code must follow this syntax
that is:- the type of number the function returns the name of the function with the () following THEN the curly brackets {}. that enclose a block of codeThis program introduces the end of line concept. A line of code can cover more than one line so the end of the line of code is represented by the semi-colon ;
Comment is a function that has string and number variables separated by a comma as its parameters. Comment outputs information to the chart window the ea is placed on. You can use this to see if your trigger code is working as expected.
Exercise: look up the if statement and have it write two different comments to the screen depending on the Ask price being above or below a manually entered price.
great....
done the hello world mql4
http://postimage.org/image/7dfpk2f3l/
Ok waiting to see the source code using the SRC for the exercise - this discussion should be started in a new thread with a different title Like "My first EA"
ok