Forex Education

Trading industry knowledge. Learn forex trading, investing in stocks, commodities.

  • Home
  • Choose a broker
  • Brokers Rating
  • PAMM
  • Investment
  • Affiliate
  • Contact
  • About us
You are here: Home / Archives for Platforms / Metatrader

Expert Magic Number in MT4

by Fxigor

Technological advancement has proven to be one of the contributing factors to the increase in trading. Since everything can be done online, many traders and brokers are giving trading a chance. You can remotely trade from any part of the world. Online trading had simplified the process, to begin with, but the coming up of the MetaTrader platform made trading even better. 

As a platform, the MetaTrader has simplified trading by eliminating emotions. The Expert Advisors allow traders to make rational decisions by focusing on ‘what is’ rather than ‘what can be.’ Along with Expert Advisors, the MetaTrader platform also gives you expert magic numbers. Let’s explore what an expert magic number is in the MetaTrader platform.

What is the MT4 Expert Magic Number?

The expert magic number represents the MetaTrader concept to track open positions generated by the Expert Advisor. Using an expert magic number, EA can mark each position by number and distinguish the opened trades versus trades that did not open. The expert magic number can be any unique number, and they are license plates for EAs.

expert magic number in mt4

The MT4 platform generates a magic number employed by Expert Advisors (EA) to track open positions. This allows the EA to manage trades in a better way. Still, confused? Let’s make simplify it – equate a magic number with a driving plate. The latter allows the authority to identify the state from where the vehicle has come from and know about the exact individual who owns it. The expert magic number does a similar job. It helps the EA differentiate between the trades that have been opened by it to the ones that it has still not opened. This analysis allows the EA to manage the account in a better way.

Using a MetaTrader Magic Number

Many traders use the same Forex pair to trade across multiply timeframes. If you are one such trader, you wouldn’t want to employ an EA to track one currency pair across different timeframes. For example, consider a situation in which you are trading GBP/USD in two ways, one using an hour chart and the other on a 15-minute chart. You will need two EAs to track these two different time frames. Here, the first EA will be trend following as it is tracking the one-hour chart and the other one is scalping as it is chasing a 15-minuet chart. It is clear from the example that you should manage trades differently when you are using different timelines.

The above example is a testimony that, along with your general stop-loss exits and takes profit, you need to run channel stops for one trade and trailing stops for the other. In such cases, you will end up in a chaotic mess if you use only the currency pair to identify different trades because the currency pair is standard across the channels. It would help if you had something that stands apart.

Your bulletproof savior in the above situation is a MetaTrader magic number. The platform assigns a specific number to each trade as soon as it is opened. The EA will now follow these unique numbers instead of the currency pair to track the trade. For example, the trend-following EA may follow the 214 magic number, while the other EA might chase the magic number 316. 

Thus, we can conclude that you can use these magic numbers to separate orders across different timeframes and strategies, especially when using the same currency pair. It makes EA more operational by allowing it to use its potential.

Finding a Magic Number for an Open Trade

The magic number for the trades that are opened manually is zero, but the trades that are opened on the MT4 platform, using an EA, are assigned unique numbers that can range from 0 to 2147483647. These numbers can help you in finding open trades. Let’s see how.

The MQL language uses OrderSend to open a trade. OrderSend is a function that is based on multiple parameters, the magic parameter being one of them. When a trade is opened by an EA using this function, a magic number is automatically assigned to the trade, known as OrderMagicNumber. Doesn’t it sound simple? The truth is, it isn’t a straightforward path when you employ this function for the first time, but it certainly gets easier with time. The more you use it, the more familiar you get with it.

All you need to do us to run OrderMagicNumber in an order selection loop. Select a trade by suing OrderSelect. This will allow you to run the OrderMagicNumber for your chosen trade. Once your trade has been assigned a magic number, you can put trade exits using the ‘if-then’ logic. It is a fairly easy technique to understand. For example:

  1. If my magic number is equal to 197, run a trailing stop.
  2. If my magic number is equal to 303, run a channel stop.

MT4 is a user-friendly platform that various brokers offer to their clients. Its codes are not as complicated as compared to other platforms. Yes, it does take some time to get used to it, but such is the case with anything new that you use. Along with EAs and magic numbers, it has various other features to maximize your profits.

Filed Under: Metatrader

Export Live Data from MT4 to Excel

by Fxigor

Microsoft Excel is one tool that is used by almost everyone. Whether you are a student, a business person, a trader, or even a homemaker, you can take advantage of this tool to organize everything ranging from content to expenses and more. On the surface, Microsoft Excel looks like a sheet that can help you manage your content. Still, it offers many other functionalities that could be highly useful for traders when used correctly. 

MetaTrader 4 is a popular Forex trading platform. It offers a plethora of features and tools that can make trading easier and more effective. Traders can use these tools to devise efficient trading strategies. However, one is required to know MQL Programming to experience the full potential of these tools. Coding is not common to all, and managing all the Expert Advisors (EAs) and indicators can leave many feeling overwhelmed. If you are finding the MQL language difficult to understand, you can try Microsoft Excel.

Export MT4 data to Excel

A trader can export live data from MT4 to Excel using a free MT4 file. A trader needs to enable Enable Dynamic Data Exchange Server (DDE server) in Metatrader Tools/Options section in the first step. In the next step, a trader needs to open the DDE-sample file from the Program Files directory. In that Excel file, a trader can change values, add new columns and rows, new instruments.

Let us see the steps:
Step 1: Enable DDE server MT4
Open Tools and Options in MT4
Enable DDE server in MT4

Step 2: Open DDE sample Excel file:
Open DDE sample Excel file

Step 3: Connect mt4 to excel. Add new instruments, quotes, rows, and columns and update live data (low, high, ask, and bid price):
add quotes live data in Excel from MT4

In Excel, traders can call ASK, BID, HIGH, and LOW price using commands and manually add new instruments:

BID request: = MT4|BID!USDCHF result: 1.2234
ASK request: = MT4|ASK!USDCHF result: 1.2235
HIGH request: = MT4|HIGH!USDCHF result: 1.2238
LOW request: = MT4|LOW!USDCHF result: 1.2134
TIME request: = MT4|TIME!USDCHF result: 21.05.02 11:52
TIMES request: = MT4|TIME!USDCHF result: 21.05.02 11:52:43
QUOTE request: = MT4|QUOTE!USDCHF result: 21.05.02 11:52:43 1.2234 1.2235 1.2238

This is one of the simplest transitions possible in the trading market. You can easily export live data from MT4 to Excel. This is how you can transfer prices:

Run the Excel software and open a chart.

  1. Click on the file. You a box will appear. You need to click on ‘Save As.’
  2. You can now rename the file per your comfort.
  3. Make sure that the file is in .csv format. CSV is the acronym for Comma Separated Values. MS Excel supports this format.
  4. Now, click on ‘Save,’ and you are done.

Benefits of Exporting MT4 Prices to Excel

Let’s begin by stating the obvious; using Microsoft Excel is easy. You can find a lot of tutorials online that can assist you in learning shortcuts as well. As it is a popular software, the chances are that you can easily find someone in your vicinity to tell you more about it. Now, let’s see the other benefits of this software that will convince you to export MT4 prices:

  • You can easily view data for longer time periods.
  • Excel files do not require a lot of space. Thus, you can easily share Excel files with others as attachments. 
  • You can use this software for price comparisons if you are using multiple brokers on the MT4 platform.
  • You do not need super-speed internet for Excel. It works offline, as well.
  • You can take advantage of this software if you are one of those who find it difficult to set up platforms.
  • Excel does not crash the way platforms do. If it does, your data gets automatically stored.
  • It is not an expensive software. If you already have Office, Excel will not cost you a thing.

Export Live Data from MT4 to Excel

The Drawbacks or Limitations of Using Microsoft Excel

While MS Excel is excellent software, it does have a few limitations rather than drawbacks. One of the most important limitations arises from MT4’s inability to save ask prices. As the MT4 platform saves only bid prices, you will export only this data to Excel. You can easily export the history of price movements, and you can do it as frequently as you wish; you cannot stream live data on MS Excel.

Download EXCEL RTD Premium Tool to export live MT4 data to Excel- MT4 excel plugin

Traders in MT4 can use a special MT4 Excel plugin to export MT4 data to Excel.

Hotforex broker offers an excellent free tool for exporting MT4 data to Excel.
Please download the EXCEL RTD tool and export live data from MT4 to excel.

In this video, you can see how it works:

Plainly put, Excel is a basic software with several advantages. It is a reasonable buy and easy to understand. It is its qualities that, sometimes, render it inadequate. If you want to up your game, you can ask a professional programmer to help you understand how to use the MT4 platform and use its tools like the EA and magic numbers. The programmer will also assist you in managing bugs. However, keep in mind that it will be an expensive alternative.

There is a middle way, as well. You can buy software or an application from a third-party. These applications can work separately as well as an extension of MS Excel. These applications are generally easy to understand. The only thing you need to keep in mind with third-party vendors is that your information on the MT4 platform becomes vulnerable. You need to ensure that the vendor is trusted and offers good customer support. We would advise you to use a VPN blocker when using a third-party extension.

Filed Under: Metatrader

How to Use MetaTrader 4? – Metatrader 4 Setup

by Fxigor

The trading process has evolved a lot, and new tools have made it an easy task to trade compared to the past decades. With innovations and new technology, the inventions of trading software have become the new normal.

You may be aware of the popular trading software MetaTrader 4 (MT4). It is quite famous for the flexibility and simplicity of trading that it provides. The platform also provides various charts that are useful for traders, and that’s what we have covered in this article, along with a lot of different functionalities of MT4. So, let’s get started!

Metatrader 4 setup

MetaTrader 4 setup is a process where users set up MT4 windows (MetaTrader panels) such as Market watch window, Navigator window, Terminal window, adjust the platform’s visual appearance, and add indicators, expert advisors, scripts,  and adjust charts. Users adjust the appearance of the platform based on personal preferences.

 

MetaTrader 4 Windows and Sections

Major windows in the MT4 platform are navigator, market watch, charts, and toolbars.

How do I navigate in MetaTrader 4?

Users can navigate MetaTrader 4 using four platform sections: navigator, market watch, charts, and toolbars.

In the image below, we can see major windows and sections in the MT4 platform:

Metatrader windows - platform sections

Toolbars:

Toolbars in Metatrader are graphical control element on which on-screen buttons and menus are placed to enable the addition of charts,  indicators,  advisors, and forms.

You can find this option on the top of your MetaTrader 4 screen. It has different icons that you can use as shortcuts for different items.

Charts:

Charts in the Metatrader platform display information that can help traders decide when to enter and exit a position and analyze the trading market.

Charts cover the majority of the screen of MT4. You can analyze and view various charts here, including the current charts.

Market Watch:

The market watch represents a window in the MT4 platform where users can see a list of assets (forex pairs, stocks, indices, commodities, etc.) and their bid and ask price.

You can find this option on the upper left side of the MT4 screen. It shows the markets that are available for you to explore. In addition to that, it also provides you with real-time bid and asks rates.

Navigator:

Navigator in MT4 represents windows where users can see a list of indicators, expert advisors, and scripts and easily add them to the chart.

You can find the option of Navigator at the bottom part of your screen. From here, you can see all your accounts, expert advisors, indicators, and scripts.

You would also see the terminal window and a few more tabs at the bottom part of MT4. It includes Account History, Trade, News, Mailbox, Alerts, and journals. You can see your pending or open trades at the Trade tab, while you can see your account activities in the Account History tab. You can also generate trading activity reports from here.

Let us see now basic steps to accomplish the MetaTrader 4 setup:

How to Customize Market Watch?

If you want to customize your Market Watch, here is how you can do it. You can see the Market Watch window on the screen at the top left corner, which shows markets available for you to trade with real-time bid and ask rates. 

If you want to check that they have showcased all the markets available to you, press Right Click and select the option of ‘Show All.’ You would see a ‘Tick Chart’ tab at the bottom part of your screen. Click on that, and you would be able to see all the current price movements of your selected currencies.

How do I get more currency pairs on MT4?

Users can display as many currency pairs on the market watch screen as they want.

Metatrader 4 users can add more currency pairs and other symbols on MT4 if they go to the market watch window, then  Right Click and press “Show All.”

get more currency pairs - add more symbols in MT4

After that, users can close the platform and open it again. In Market watch, they will see more symbols.

How Can You Open a Chart?

If users want to open a chart on the Metatrader platform, they need to tap on the ‘Add New Chart icon in the Toolbar. They can also do the same by clicking on the File menu at the top left corner, after which you have to click the ‘New Chart’ icon. Users can also click on the Market Watch Window to see all the currency pair charts. Jurs select the currency pair, choose the Chart Window, and press the New Chart Icon.

See in the video below:

 

 

How do I save a chart in MT4?

  1. If users want to save a chart in MT4, they need to click on the “Templates” shortcut or, from the toolbar, choose the option Charts/Templates.

save chart template mt4

  1. Select “Save Template”
  2. Give a title to your new template, such as “Analysis 1.”
  3. Finally, click on “Save.”

MT4 chart setup – Metatrader 4 chart explained

For doing this, open a chart and press right-click. From the bottom of the menu, select ‘Properties.’ You will find the Colors’ option, which would let you change it.

mt4 chart properties

Just right to this tab, you can see the Common Tab. It would allow you to customize a few more features like the chart – Line chart or Candlestick chart you would like to see.

mt4 chart setup

 

These are MT4 chart setup options:

The background is the MT4 chart setup option to set chart background color;
The foreground is MT4 chart setup option to set the color of axes, scales, OHLC line;
Grid is an MT4 chart setup option to set a chart grid color.
Bar Up is an MT4 chart setup option to set the bar up, shades, and fringing of the Bull Candle body.
Bar Down is an MT4 chart setup option to set the bar down, shades, and fringing of the Bear Candle body.
The bull candle is an MT4 chart setup option to set the color of the Bull Candle body.
The bear candle is an MT4 chart setup option to set the color of the Bear Candle body.
The line graph is MT4 chart setup option to set line chart and doji;
Volumes are an MT4 chart setup option to set volumes and levels of open positions.
Ask line is an MT4 chart setup option to set the color of the Ask line.
Stop levels is the MT4 chart setup option to set stop orders levels (Stop Loss and Take Profit).

After choosing your preferred themes, you can also save them as a template. For these, click on the Template icon from the Toolbar and tap on Save Template. You can also right-click on the chart, select Template, and Save Template.

Apart from this, you can zoom in or out of the chart and can select the time frame you would like to see on the chart. It can range from a minute to a month as well.

 

How do I set the default template in mt4?

Users can set the default template in MT4 by making a new template and then save that template with the name “Default” (default. tpl). After that, by default, all newly opened charts will look like the default template.

Add Installed and Custom Indicators to MT4 Charts

Users can add pre-installed indicators in MT4 charts by clicking on the Add Indicators icon from the Toolbar or the toolbar option Insert/Indicators.

add indicators on MT4 charts

In the Terminal folder of the Metatrader platform, there is an MQL folder, and inside that folder is the Indicator folder.

  • Bollinger Bands
  • Relative Strenght Index
  • Average Directional Moving Index
  • Ichimoku Kinko Hyo
  • Moving Average
  • Standard Deviation
  • Moving Average
  • Envelopes
  • Ichimoku Kinko Hyo
  • Parabolic SAR
  • .etc

Custom indicators traders can install to the MT4 platform if they copy indicator files into the Terminal/MQL/Indicator folder, refresh the MT4 platform, and add indicators using option Insert/Indicator.

See the video below to see how to add custom indicators on MT4 charts.

 

You can also add Oscillators if you go to the Oscillators tab. It would let you add MACD, RSI, and much more.

Arrange Multiple in MT4 Screens

Just like all the other options, changing between multiple screens is easy too. Just open a new chart in the same template that you have your current chart on. After that, go to the Market Watch window and select the market. You have to left-click and drag the same on the chart section that has your Open chart. It will open a new chart of the market you have selected.

If you want to arrange more than one chart, left click and drag them to your preferred location. You can always minimize, change the size, or close it from the charting options available. It is very similar to minimizing or closing your web browser.

Set the Language

MT4 provides you a lot of language options to understand the language and use the software with ease. For changing or setting up a language, go to the View from the menu. Select the ‘Languages’ option and select the language you would desire. All done!

Customize MT4 Toolbar

You can customize or organize the tools available in the Toolbar by dragging and dropping them in their preferred series or location.

By default, there would be some tools in your Toolbar, but you can always customize them as per your needs. You can also remove the lease used tools. 

Right-click on the Toolbar and choose the Customize option. It will open the window, from which you can select the tool you want to add; press on Insert. There is an option of Remove to remove the least used tools from the Toolbar.

The Bottom Line

The MetaTrader 4 is indeed a beneficial and easy to use trading platform. Once you are familiarised with its concept and tool and windows positions, it would become a child’s task for you to trade on it. I hope this article has helped you in clearing your doubts. All the best!

Filed Under: Metatrader

How to Install Metatrader Multiple Accounts?

by Fxigor

Simple Ways to Install Multiple MT4 Accounts on the Same Computer

Trading is now very much popular. Due to some advanced tools and proper guidance, people can easily trade and earn money as much as they want. Trading is now a new way of investment for our generation. We all know that MetaTrader 4 or MT4 is known as a widely accepted and used electronic trading platform. MetaTrader 4 platform was established in the year 2005. After that, it has gained so much popularity among traders. Now the good news is that traders can open and handle multiple accounts from one computer or VPS. It is now much simpler than you have thought before. So, it is important to know how to open and handle multiple MT4 accounts on the same computer if you want to do it on your own. It would help if you learned how to do it.

There are two ways how to install Multiple MT4 Accounts and manage them on a single computer. The first method is the free method, where traders can install the same MT4 terminal several times on the same computer. The second method is the paid method, where traders can install a multi-terminal version.

In this method, you can easily open two, three, or more numbers of accounts from your one computer. Not only this but now you can log in to various accounts and trade from all of these. You do not need to face any obstructions to do that. So, now it is simple and hassle-free. You do not need to log in and log out again and again from one account and another. So, now you can stay live from all of your accounts at one time. You can trade effortlessly from your real and dummy accounts as well. So, as you can see, METATRADER MULTIPLE ACCOUNTS offer you a blissful and advanced experience of trading.

Apart from this, you can now open identical trades on all MT4 accounts at one single time. So, now you can manage all of your MT4 accounts and hold your position in various MT4 accounts. The same broker will not be a problem in this case.

WHY DO YOU NEED TO INSTALL VARIOUS MT4 PLATFORMS ON YOUR SINGLE COMPUTER?

Now you are thinking, why do you need to install multiple MT4 accounts on your one PC. There are two main reasons for which a Forex trader needs to install multiple MT4 accounts. So, here are two reasons, such as follows:

1. The first and primary reason is that the traders can sign in to different accounts simultaneously. It is, of course, a big benefit. In the past, you can sign in to one MT4 account from the same and indifferent broker. So, you can install more MT4 terminals on your PC. After that, you can log in to different accounts at a single time.

2. The second one is also valuable and essential. You can copy Forex trading options between various MetaTrader accounts as you may hear that copying trade is very much well-known among Forex traders.

Apart from this, you can get one more benefit from opening multiple accounts. You can get valuable advice from the experts. So, if you have multiple MT4 accounts, you will have to run so many strategy testers simultaneously.

ADVANTAGES OF INSTALLING MULTIPLE PLATFORMS:

There are so many advantages of installing multiple MT4 platforms. Here are some of these:

* The main goal of this particular set up is to spread memory usage and improve each MT4 platform or account’s performance.
* You can organize the whole thing about trading very simply and smartly.
* Now, you can trade from multiple accounts at the same time.
* This is now a hassle-free process.

Now, you may think about how to install it on your computer. You should know that the process is very much simple.

THE INSTALLATION PROCESS OF VARIOUS ACCOUNTS ON A SINGLE COMPUTER:

If you want to install various MT4 terminals on a single computer, you should know that it is straightforward and easy. All you need to do is repeat the same process of installing one MT4 platform. But in the case of various account installation, you will have to choose various and different locations for the installation process. This is a smart trick to install METATRADER MULTIPLE ACCOUNTS on a single computer and trade from all of these without any obligations. By following this smart method, you can install various MT4 platforms from the same or various brokers.

So, as you proceed to install second and third terminals or so, all you need to do is change the location to a different and unique folder. So, in this way, the location will be changed. You can name the folder differently. You can change the last number of the name in the folder. Apart from this, you need to install different files in different folders as well. You can select any names you want to use, but each name should be unique.

So, while you are going to run the installed MT4, you will have to change the installation’s destination folder. You will get the setting button, and after that, you will get the Next and Cancel button. So, while you will click on the setting button, you can change the MT4 destination folder.

THE FAST AND EASY WAY TO INSTALL VARIOUS MT4 TERMINALS:

After installing one MT4 terminal, you can copy and paste the command. For this, you can use CTRL+C and CTRL+V from your keyboard to complete the copy and paste process. After installing multiple MT4 terminals, it is high time to run each and separate terminal differently and individually. So, for this process, you need to start an account for every platform.

With the MT4, you can get a clean and clear feature. You need to enter the name of the broker. You will get this easily.

HOW MANY MT4 PLATFORMS YOU CAN RUN ON YOUR COMPUTER?

There is no limit to the number of your MT4 platforms. You can install and run one, two, three, or more MT4 terminals on your single PC. You can run 4 to 6 platforms at a single time from your single PC. So, as you can see, you will be able to run multiple MT4 terminals from a single device. You should be able to handle multiple accounts without any hassle.


Install Metatrader Multiple Accounts using multi-terminal software version

The Metatrader 4(MT4), Metatrader 5(MT5) software has a Trade tools FX (TTFX) multi-terminal version, which allows investors to trade on Metatrader Multiple Accounts using a single computer. This version is preferred by money managers or regulated institutions managing the account for a large number of clients. This version of the software provides all the features of MT4/MT5, allowing the user to place or edit orders. The user can also limit the orders and decide the closing position. Depending on their financial goals, the clients have specified different trading strategies for each account. The money manages each account based on the instructions from the client.

Multi-account terminal Security

The software for the multi-account terminal is using 256-bit encryption technology for greater security. This ensures that the trading account and trading data in real-time is secure, remains confidential, and is not tampered with. The financial/trading data is also synchronized with information on TTFX client devices. The computer, mobile version of the software can be used on the client devices. This allows the account managers to check the status of the account anywhere they wish and trade, placing orders for different Forex accounts simultaneously.

The multi-account terminal interface is similar to that used in a terminal for Metatrader 4 or Metatrader 5. This makes it easy for traders who have already used MT4/MT5 to switch to the multi-account version for trading for clients. The platform is widely used by professional traders, asset managers, and money managers to access, monitor, and trade for multiple accounts. They can group the different accounts which they are managing for convenient trading. The trader or manager can also specify different sizes for the trading in each account he is managing.

The trader can trade in each account, which is part of the group and monitors the account’s activity. It can be used for taking a printout of the statement and equity for the client. The account manager can execute any market order, stop order, limit order using one click. The execution speed for the orders on these platforms will be similar to single account terminals. The TTFX terminal also has advanced features for customization. These features allow the manager to trade in the Forex or other market using the interface in multiple languages.

Multi-account terminal Advantages

Some of the TTFX terminal advantages are complete control over methods used for allocation, managing the sub-accounts in real-time, and a full trading log is available. Incorporating an Expert advisor is also possible. The administrator can control all accounts, manage the open and close positions and allocations. A complete log of the user’s activities is available, along with access to the full report. There is no limit to the number of trading accounts which can be opened. All trading activity can be managed in real-time. In addition to foreign exchange (FX), traders can also trade in metals and CFDs. Different types of trading strategies like hedging, scalping, news trading are allowed, with system alerts, trading, trending events, fast news provided so that the trader can take the right decision accordingly. It also includes an internal mailing system

Filed Under: Metatrader

MetaQuotes Language MQL4 MQL5 Review – MQL4 vs MQL5

by Fxigor

Forex trading platforms MetaTrader 4 and MetaTrader 5

Have you been wondering about which are the best forex trading platforms?

It is noted that the industry of trading software is under the heavy domination of the MetaQuotes Corporation. It is realized that this is the company that created MetaTrader 4, which in shortened form is referred to as MT 4. Though MetaTrader 4 is indeed regarded as being the primary choice of those who are regarded as being professional traders, the truth is that other options do exist for traders, which have been created in the past few years.

MQL4 vs. MQL5 MQL4 and MQL5 programming language’s main difference is syntax because MQL5 is more similar to C++ than MQL4. MQL4 and MQL5 are excellent programming languages and great tools for traders. MQL5 is not better than an MQL4 programming language because in 95% real programming situations, programmers can code excellent in both languages.

Look at this example of Predefined Variables in MQL4 and MQL5:

MQL4 MQL5
double AskMqlTick last_tick;
SymbolInfoTick(_Symbol,last_tick);
double Ask=last_tick.ask;
int Barsint Bars=Bars(_Symbol,_Period);
double BidMqlTick last_tick;
SymbolInfoTick(_Symbol,last_tick);
double Bid=last_tick.bid;
double Close[]double Close[];
int count;   // number of elements to copy
ArraySetAsSeries(Close,true);
CopyClose(_Symbol,_Period,0,count,Close);
int Digitsint Digits=_Digits;
double High[]double High[];
int count;   // number of elements to copy
ArraySetAsSeries(High,true);
CopyHigh(_Symbol,_Period,0,count,High);
double Low[]double Low[];
int count;   // number of elements to copy
ArraySetAsSeries(Low,true);
CopyLow(_Symbol,_Period,0,count,Low);
double Open[]double Open[];
int count;   // number of elements to copy
ArraySetAsSeries(Open,true);
CopyOpen(_Symbol,_Period,0,count,Open);
double Pointdouble Point=_Point;
datetime Time[]datetime Time[];
int count;   // number of elements to copy
ArraySetAsSeries(Time,true);
CopyTime(_Symbol,_Period,0,count,Time);
double Volume[]long Volume[];
int count;   // number of elements to copy
ArraySetAsSeries(Volume,true);
CopyTickVolume(_Symbol,_Period,0,count,Volume);

We can see that MQL5 is complicated than MQL4. MQL4 syntax, in some cases, is better and faster than MQL5.

MetaQuotes PlatformsRegardingo conducting trading on the forex market via the internet, most brokers tend to supply diverse trading platforms. However, the outcome is that most people tend to choose MetaTrader 4. It was almost ten years ago that the software had been created. At this present time, the MetaQuotes Corporation offers two key trading platform selections, which are considered to be MetaTrader 4 along MetaTrader 5.

MetaTrader4

Metatrader 4 is regarded as being a platform that was particularly crafted with forex trading in mind. Because the retail forex is quite a novel industry, there was no accessible software by third parties that was reliable until the arrival of MetaTrader 4. This trading platform is ultra-reliable and allows traders to have access to many highly beneficial features. They consider that trading is done with just one click, the provision of more than fifty indicators, access to many advisors who are real experts, limit orders, pending orders, nine varied time frames, and multi charting.

It cannot be denied that there are some impressive advantages of the usage of MetaTrader 4. Many people choose this platform due to its powerful stability. This makes the platform dependable and trustworthy. Moreover, there are some mighty mobile apps. The applications will function for almost all operating systems, such as Windows, Android, and iOS. The mobile versions also provide a high level of stability.

Sometimes, some brokerage firms may present a wider array of spreads about the MT4 platform than the tighter array of spreads presented via their primary trading platform as the brokerage firm grants a variety of trading platforms for the trades of traders. Also, some traders who are regarded as professionals tend to claim that the platform operates slower than other platforms where they conduct their trades.

Though MetaTrader4 is rather powerful as a platform on its own merit, it is realized that there is a plugin for this platform that is provided by Admiral Markets. It is noted as being referred to as the MetaTrader4 Supreme Edition Add-On. This add-on supplies traders with more than fifty extra tools. The plugin dramatically improves the advantages of engaging in the usage of MetaTrader 4. It also provides wider access to a one-click trading option that is more flexible. It is referred to as the mini-terminal. You will discover the accessibility of new orders,s such as OCA orders. Further, you can conduct the dragging and dropping of taking profits and stop losses regarding the trades you have conducted.

MetaTrader5

MetaTrader5 is considered to be somewhat like MetaTrader 4. It is classified as being one of the top best-performing trading platforms for the forex market at this present time. MetaTrader 5 has a faster rate and allows for the provision of a wider span of different orders. It also grants the provision of more indicators and also allows access to extra features. While this is a superior platform, it is noted that there are not any significant or revolutionizing elements that can cause MetaTrader4 to experience redundancy. MetaTrader 5 is an impressive selection for brokers and traders because it can manage a larger number of trading elements than MetaTrader 4.

Though MetaTrader 5 is indeed much like MetaTrader 4, the reality is that some diverse advantages are not part of other trading platforms regarding the forex market. MetaTrader 5 empowers the traders to view twenty-one varying timeframes. There is the provision of eleven distinctive minute charts, such as the usage of M1, the usage of M2, the usage of M3, and the usage of others. Also, there is the provision of seven varied hourly charts designated as the H1 hourly chart, the H2 hourly chart, the H3 hourly chart, and others. Also, there is the usage of daily charts, weekly charts, and even monthly charts. On the other hand, the majority of trading platforms, including MetaTrader 4, offer the provision of just nine-time frames.

MetaTrader5 is a great choice for traders as a result of it providing six kinds of pending orders. This considers orders categorized as being sell stop, buy stop, sell limit, buy limit, sell stop limit, and buy stop limit. MetaTrader 4, along with other platforms for trading on the forex, usually only grants four kinds of pending orders. When you engage in MetaTrader 5, you can switch from the mode for hedging to the mode for netting. The mode for hedging permits you to access trades in positions that are opposing each other. This has contributed to the revolution of the options for trading on the forex market. This platform also grants the function for the viewing of the depth of the market. This permits the traders on the forex to see the bids and the offers set at varied prices regarding the financial instruments.

Here’s what you should know about Metaquotes language MQL4 MQL5

Are you looking for some integrated programming languages that can be used in developing trading robots, scripts, technical market indicators, and function libraries, etc.? If yes, you can use MetaQuotes Language 4 (MQL4) and MetaQuotes Language (MQL5). These two languages are used in conjunction with the MetaTrader software.

Are you wondering what the primary objectives of these two languages are? Well, they are mostly used in the automation of trading and operational analysis. Rest assured that both of these two languages are backed by an extensive codebase, including source code and library.


History of Metaquotes language MQL4 MQL5

MetaTrader platform was developed and released by MetaQuotes Software on July 1, 2005. This platform was meant to perform trading in financial markets. Now, MQL4, which is an object-oriented programming language, is designed to work on this platform. At the initial stage, the MQL4 language is used to follow the syntax of C.

Next, MetaTrader 5 was released during 2010 along with the MQL5 – a new language. In 2014, MetaTrader 4 600 builds were released, which brought some major new language updates. MetaEditor (the development environment) was unified to support MQL4 and MQL5.

Note, the updated version of MQL4 (600 builds) offers a set of new functions and graphical objects, mostly used to analyze different charts. In addition to it, the protection system was completely modified to execute EX4 files. Speaking of the similarity between MQL4 (600 builds) and MQL5, the entire standard library is almost transferred from MQL4 to the updated MQL4 (except the trade subsystem). In addition to it, new data types are also introduced to MQL4. You will also find the micro substitution systems expanded like #ifndef, #ifdef, #endif, and #else. In this way, MQL4 (600 builds) is made suitable to use on the code of other languages like C++ and C. In this build, you will even get many classes, object pointers, and structures added. Note that the updated MQL4 offers a strict compiling mode, which further helps you detect and avoid potential programming errors.

Coming to MQL5, this strict compiling mode is automatically available to I,t, and it can’t be disabled. Also note, both MQL5 and updated MQL4 support object-oriented programming concepts except the following topics, such as overload, multiple inheritances, polymorphism, extensibility of types, virtual functions, and encapsulation.

MQL4 vs. MQL5 Compiler

Do you want to know more about the compiler used to compile the above two programming languages? Well, it’s MetaEditor. This compiler will be embedded in the development environment. For example, it’s automatically integrated with both MetaTrader 5 and MetaTrader 4 trading terminals. Now, for your quick reference, this compiler allows the convenient editing of the source code, profiling code, developing joint applications remotely in conjunction with other developers, and automatically generate projects by using a template.

Difference between Metaquotes language MQL4 MQL5

In the above sections, you have already revealed the similarities between MQL4 and MQL5. In the below sections, you will mostly find the fundamental difference between them.

The first and foremost difference lies in their trading system setup. For instance, MQL5 should be used to design a positional system. On the contrary, MQL4 should be used to implement trading programs of an order system.

Apart from that, the MetaTrader 5 trading terminal has defined clear delimitations about these two trading programming languages on topics like order, deal, and position. Note, the order is known as a request that can execute a trading operation. The order can lead to a final trading deal. And, all aggregate deals of a certain financial instrument is termed as position.

In MQL5, you will find a list of expanded trading functions that can be used on open orders, order history, deal history, and open positions. But, in MQL4, different functions are available to perform the above actions, such as OrderClose(), OrderModify(), OrderSend(), OrderDelete(), and OrderCloseBy(). You can use these functions to open, close, and delete pending orders.

In MQL5, the OrderSend() function is used to carry out all trading operations by sending trade requests. Now, the parameters of this function can vary depending on your trading programs. MQL5 also enables asynchronous trading operations by introducing a new function — OrderSendAsync().

Data types of Metaquotes language MQL4 MQL5

Here’re some of the common data types that you can use in both MQL4 and MQL5.

* integers
* literals
* boolean/logical
* floating point
* strings
*Date and time
* enumeration
* color

In MQL4/MQL5, you can also use structures and classes as well. Note, these are complex (abstract) data types. These abstract data types support the following features and characteristics.

* Keyword class should be in the declaration
* Supports inheritance
* The class members will have private access by default,t and the structure members will have public access
* Class objects will have virtual functions, but structures won’t have it
* New operators can be applied to the class objects, not the structures.

Capabilities of Metaquotes Language mql4 and mql5

Note, MQL4/MQL5 aims to help you address all the needs and requirements of a trader. These programming languages were developed for writing and executing trading programs. The common functions for performing trade operations are OrderClose(), OrderClose(), OrderModify(), OrderCloseBy(), and OrderDelete().

Please reveal the common four program types in MQL4/MQL5 below:

  •  Expert advisors: This program type should be used for automatic systems trading cases. It follows the pattern of a coded algorithm and the use of specified parameters. Examples of actions where expert advisors can be used: receiving a new tick, alerting new trading operations, clicking a mouse, and pressing a button.
  •  Custom indicators: The user,s should use this program type and should be used along with some ready-made indicators. They typically do not perform any trading operation s, and their part is analytical. Examples of actions where custom indicators can be used: to monitor a situation, to reflect it, to interpret it, and then to submit it for analysis to a trader.
  •  Scripts: This program type is used to perform the single execution of some specified actions.
  •  Custom function libraries: This program type allows you to create #include files. These include files used in various functions and classes instead of pasting the program’s direct source code.

MQL4 vs. MQL5 Syntax

Although the syntax of MQL4 and MQL5 are similar to c++, there are some differences. They don’t have pointer arithmetic, goto operator, multiple inheritance, and anonymous enumeration.

Text formatting: Well, you can use space symbols (like tabs, spaces, and empty strings) to make the code readable and convenient. However, please do not use space symbols inside identifiers, keywords, and constants. Also, don’t use a line break symbol after a hash.

Comments: Both single-line and multi-line comments can be used. For single-line comments, they start with // symbols and end with newline characters. For multi-line comments, it starts and ends with /* and */ characters.

Identifiers: This is used to name a function or a variable. Their length must not exceed 63 characters, and they can include the following characters, such as numbers 0-9, lower case letters, upper case letters, the underscore character, etc. You can’t use a number as the first character while defining an identifier.

Expressions and objections

The common operations like binary, bool, and arithmetic are present in MQL4 and MQL5.

Disadvantages

There is a major disadvantage of these languages. They can’t create independent applications as these languages should be based on their corresponding platforms. And, it’s compatible with only.EX4 and.EX5 file extensions.

Conclusion
MQL4 vs. MQL5 analysis showed that both languages are as good as tools and easy languages for programming. MQL5 is not better than MQL4, and the proof is that most programmers use Metatrader 4 and MQL4 as a based programming language.

Filed Under: Metatrader

  • 1
  • 2
  • 3
  • Next Page »

Website categories

Main Forex Info

  • Forex Calendar 2020
  • Forex Bank Holidays Calendar 2021
  • Non-Farm Payroll Dates 2021
  • Key Economic Indicators
  • The Best Forex Brokers Ratings List
  • Top Forex brokers by Alexa Traffic Rank
  • Forex Brokers with Free Initial Deposit in 2020
  • Brokers That Accept PayPal Deposits
  • What is PAMM in forex? Are PAMM Accounts Safe?

Main navigation:

  • Home
  • About us
  • Forex brokers reviews
  • MT4 EA
  • Education
  • Privacy Policy
  • Risk Disclaimer
  • Contact us

Forex social network

  • RSS
  • Twitter
  • FxIgor Youtube Channel
  • Sign Up. Get newsletter.

Spanish language – Hindi Language

Spanish language website Hindi language website
Risk Warning: Trading leveraged products such as Forex and CFDs may not be suitable for all investors as they carry a high degree of risk to your capital. Trading such products is risky and you may lose all of your invested capital. Before deciding to trade, please ensure that you understand the risks involved, taking into account your investment objectives and level of experience.

Copyright Forex.in.rs 2007