Difference between mq4 file and ex4 file
- ex4 file computer machine file - can be used by mt4 and appears in the navigator window (mql4 does not)
- mq4 file can be edited; code can be seen
- mq4 -> compile -> ex4
Comment function
- how to comment 1: put double hashmarks (2 forward slashes = //) before each line (greys out a single line); this comments out code lines -> EA cannot see them -> make your notes in the code
- how to comment 2: comment out a whole section -> combination of forward slash and asterisk -> /* code */
Property copyright and link
- don't have to be in the code
- appears as popup of ex4 file in the navigator window
Functions (for indicators and Eas)
- initialisation function: what should the EA do when you first drop it on a chart? get prices?
- deinisalisation function: what should the EA do when you remove it from a chart? clean arrows or lines for example
- start function: what should the EA do when the price changes (tick by tick)? Here is the actual code of the EA
- Advice: You can build a new EA with the editor and take a look at the code
Source
Further course notes:
MQL4 - Lesson 2 | Extern | Types of data constants
MQL4 - Lesson 3 | Extern variable and functions | Void functions
MQL4 - Lesson 4 | Make an EA
MQL4 - Lesson 5 | Diagnostic tool for EA | Make an indicator | Make a script
MQL4 - Lesson 6 | Message box and market info
MQL4 - Lesson 7 | Leverage info | Buttons for message box | Write our own functions
MQL4 - Lesson 8 | Message box function | Function calls another function | Special MA
Further course notes:
MQL4 - Lesson 2 | Extern | Types of data constants
MQL4 - Lesson 3 | Extern variable and functions | Void functions
MQL4 - Lesson 4 | Make an EA
MQL4 - Lesson 5 | Diagnostic tool for EA | Make an indicator | Make a script
MQL4 - Lesson 6 | Message box and market info
MQL4 - Lesson 7 | Leverage info | Buttons for message box | Write our own functions
MQL4 - Lesson 8 | Message box function | Function calls another function | Special MA
Spam. No thanks.
ReplyDelete