Announcement:
  • If you need to open an account, you can contact customer service to guide the operation.
  • Customer service WeChat: Jin-DaoCheng
    1. Home > Transaction Documentary

    Introduction to MQL4 Language Basics and Detailed Functions

    MetaQuotes Language 4 (abbreviated as MQL4) is a built-in programming language specifically designed for writing trading strategies. With this language, users can create their own Expert Advisors and implement fully automated execution of trading strategiesTMGMForex PlatformFor traders, MQL4 can be a great help to achieve personalized trading ideas. In addition, users can also use MQL4 to createcustom metrics、scriptandlibraryThis further expands the analytical tools.

    The language contains a large number of functions for analyzing current and historical quote data, and provides basic arithmetic and logical operators. It also includes some common technical indicators and order management commands, making it easy for users to quickly build a trading system.

    MetaEditor 4 is a text editor for writing source code for MQL4 programs. It supports syntax highlighting, which makes it easier for users to write Expert Advisors. The MetaQuotes Language Dictionary is an auxiliary tool for the MQL4 language. It is a simplified guide covering various functions, categories, operators, reserved words, and other language elements, and it is clearly divided by category, where users can find the required instructions.

    With MQL4, programs can be written with different functions and purposes, including the following:

    Expert Advisor

    An Expert Advisor is an automated trading system (MTS) attached to a specific chart. For a given currency pair, it runs automatically with the arrival of each tick of data. If the Expert Advisor is processing the previous data (i.e. the operation has not been completed), it will not be launched repeatedly. This trading system is able to automatically send orders to the trading server while prompting the user to trade. Similar to most trading systems, the client side supports testing trading strategies with historical data and displays buy and sell out-points on the chart. Expert Advisors are stored by default in the terminal_directory/experts directory.

    custom metrics

    custom metricsThey are new technical indicators written by users themselves, unlike those built into the client side. They cannot be used for automated trading, but only as a tool for analyzing data.custom metricsStored in terminal_directory/experts/indicators directory.

    script

    scriptIt is a program designed to perform a specific function, unlike an Expert Advisor.scriptCannot be executed independently, only by calling.

    scriptStored in the terminal_dictionary/experts/scripts directory.

    library

    libraryIs a collection of commonly used custom functions.libraryinscriptCannot run alone.

    libraryStored in the terminal_directory/experts/libraries directory.

    include file

    include fileIt is often used to reference blocks in the source code. During the compilation stage, these files can be included in Expert Advisors,script、custom metricsandlibraryIn the source code. useinclude filethan calllibraryBetter because the calllibraryThere will be additional expenses.

    It is recommended thatinclude fileStore in terminal_directory/experts/include directory.

    Click to inquire about transaction account opening

    Please indicate the source: https://www.daoctech.com/fxoutrade/2365.html

    Disclaimer: The content of this article does not represent the views of the Institute of Foreign Exchange. The content is for reference only and does not constitute investment advice. Investors operate accordingly at their own risk.