MetaTrader provides a powerful trading platform that is light and robust. The platform is one of the most popular trading platforms for already more than a decade since its release in 2005. MetaTrader is also known by its abbreviation MT4 or MT5 for its successor. The platform is licensed to foreign exchange brokers as a vertically integrated client/server trading software. The server-side software is run by the broker, and the client interface is provided to the traders. The client-side is the software that we will talk about throughout this guide, which comprise the following main components:

  • Real-time, live streaming instruments prices
  • Charts, indicators, and graphs
  • Terminal component
  • Integrated Development Environment (IDE)
  • Strategy Tester for back-testing robots

As you can see, MetaTrader is a comprehensive suite of tools for trading. In this guide, we will particularly emphasize the Integrated Development Environment (MetaEditor) and the Strategy Tester, which are the components to create and implement your trading robot. You have probably heard the words “Expert Advisor” or its abbreviation “EA.” In MetaTrader’s vocabulary, “Expert Advisors” are just another way to describe trading robots. Before we start to deep dive into coding our trading robot or expert advisor (EA), let us go through the settings. We must enable running our algorithms. By default, MetaTrader’s auto trading is not enabled, and it will not let you run any automated scripts unless you switch on the functionality in the options. To change these settings, point to the menu “Tools,” then click on “Options.” The Options window will pop up, giving you the choice of different tabs. Choose the “Expert Advisors” tab (fig.1, fig.2).

MT4 Options/Expert Advisors

Fig.1 MT4 Options/Expert Advisors

MT5 Options/Expert Advisors

Fig.2 MT5 Options/Expert Advisors

First, make sure the master switch is enabled to “Allow automated trading” (fig.1) or “Allow algorithmic trading” (fig.2), depending on which platform you are using. MT4 and MT5 differ slightly. In this tutorial, we will guide you on both and highlight the key differences. Enable the following features for your respective platform:

MetaTrader 4 MetaTrader 5
  • Allow automated trading.
  • Disable automated trading when the account has been changed.
  • Disable automated trading when the profile has been changed.
  • Disable automated trading when the chart’s symbol or period has been changed.
  • Allow DLL imports.
  • Allow algorithmic trading.
  • Disable algorithmic trading when the account has been changed.
  • Disable algorithmic trading when the profile has been changed.
  • Disable algorithmic trading when the chart’s symbol or period has been changed.
  • Allow DLL imports.

Most of the features we chose to “disable auto trading” is to protect your trading account from unfortunate losses if you change any settings on MetaTrader charts while running your expert advisor in parallel. Press “OK” to save your settings and return to the terminal. From the toolbar, make sure the master switch is enabled to allow auto trading. If it is activated, the button will turn green.

Auto trading “master switch” (MT4, MT5) Auto trading “master switch” (MT4, MT5)
Fig.3 Auto trading “master switch” (MT4, MT5)

Leave a Reply

  +  38  =  47