Skip to content

Mql4 Reference Manual

Posted on by
Mql4 Reference ManualMql4 Reference Manual

YOUR trading system could FAIL if you have an urgent appointment. That's why most traders here want to automate their own strategy in MetaTrader! If you cannot program in MQL4, like me, then LET'S LEARN MQL4 TOGETHER. List of MQL4 Functions - MQL4 Reference. Returns the short name of the indicator by the number in the indicators list on the specified chart window. Mql4 reference pdf Mql4 reference pdf Mql4 reference pdf DOWNLOAD! Mql4 reference manual References. Bulbrokers media cms page media 187 mql4. Download >>Download Mql4 reference manual Read Online >>Read Online Mql4 reference manual mql4 programming pdf mql4 programming for dummies mql4 reference download.

Expert Advisor Creation Expert Advisors are programs that allow automation of the analytical and trading processes in the MT4 platform. To create an Expert Advisor (or 'Expert'), the expert editing program - MetaEditor - has to be opened from within the MT4 platform. To open the editor (see Figure 1): • In the Navigator window, right-click on Expert Advisors and select 'Create'; or • In the Main Menu >Tools >MetaQuotes Language Editor; or • Click on the MetaEditor icon in the Standard Toolbar: or • Press F4 on the computer keyboard. Figure 1 - There are several ways to open the MetaEditor. Any of these actions will open the Expert Creation Wizard. The Wizard can be used to create Expert Advisors, Custom Indicators, Scripts and DLLs. To create an Expert Advisor, select 'Expert Advisor' and click 'Next' to continue, as shown in Figure 2.

Figure 2 - MT4 's Expert Advisor Wizard is used to create Expert Advisors, Custom Indicators, Scripts and Libraries (DLLs). The 'General Properties of the Expert Advisor' window appears.

Here, traders must specify the: • Name - A user-created name for the Expert. • Developer - The developer's name. • Link - To the developer's website, if applicable. • Inputs - the list of Expert inputs To add a new parameter to the Inputs field, press the 'Add' button. For each Parameter, the trader must specify the Name, Type and Initial Value, as shown in Figure 3.

To delete a parameter, highlight the parameter and press 'Delete.' These become the Input Variables within the Expert. Once all the inputs have been listed, click 'Finish' to continue. Figure 3 - Create the input variables by identifying Name, Type and Initial Value. A new window appears in the programming environment.

The Expert's name appears at the top of the window, and the previously entered input parameters are listed near the top of the code, as shown in Figure 4. Figure 4 -The Expert name and inputs appear in the code window. From here, the Expert code can be entered into the window using the MQL4 programming language and syntax (see Figure 5). Note: Specifics regarding programming are outside the scope of this tutorial; understanding programming logic and learning a specific language require significant effort.

Traders can learn more about programming in the MQL4 environment by reading the MT4 Help Guides and participating in the active MQL4 community forums. MQL4, like other proprietary languages, has a list of Reserved Words and Standard Constants that are used during programming.

Examples of constants for trade operations, along with their descriptions, include: • OP_BUY - Buying position • OP_SELL - Selling position • OP_BUYLIMIT - Buy limit pending position • OP_SELLLIMIT - Sell limit pending position • OP_BUYSTOP - Buy stop pending position • OP_SELLSTOP - Sell stop pending position Figure 5 - part of the code for an Expert Advisor. Certain words have predefined uses; here, OP_SELL instructs the computer to sell if other criteria are met ( if statements).

Traders can find a MQL4 Reference in the Help tab of the Toolbox in the MetaEditor window. This Reference includes information that is helpful to beginner and experienced programmers including: • Basics • Standard Constants • Predefined Variables • Program Run • Account Information • Array Functions • Common Functions • Conversion Functions • Custom Indicators • Date & Time Functions • File Functions • Object Functions • Trading Functions SEE: Expert Advisor Compiling After the Expert development has been completed, it must be compiled in order to ensure that the code has been written in the proper format needed to run the Expert.

To compile the Expert: • Select File >Compile (see Figure 6); or • Click the Compile button on the toolbar; or • Press F5 on the computer keyboard. Airowizard. Once compiling has been initiated, an update appears in the Toolbox beneath the code in the MetaEditor window, as shown in Figure 6. An errors or warnings will be listed. Figure 6 - Successful compiling with zero errors and zero warnings.