An über-simple guide to customizing Metatrader

Anton HughesAnton Hughes , Co-founder, Magick.nu
Denmark, 20 March 2012 at 11:24 GMT+0
Recommended Recommend Unrecommend Recommend

Automated traders love Metatrader 4, and most customize it, usually with the help of MetaQuotes Language 4, otherwise know as Mql4.

Here's a startup guide for how to customize your metatrader, with a focus on authoring Expert Advisors and Custom Indicators.

What are Expert Advisors?

EAs are arguably the most powerful feature of MT4. They allow for automated trading, including:

·         Opening and closing orders based on market events.

·         Modifying orders, for example, changing a stop loss or take profit.

For a full list of order-related functions see http://docs.mql4.com/

What are Custom Indicators?

There are several standard Technical Indicators that ship with MetaTrader 4.

But if you want to find new and creative ways to analyze market information, or include other information on charts, you can do this by developing a Custom Indicator.

Getting started

Metatrader ships with MetaEditor, a development environment for authoring Expert Advisors and Custom Indicators.

Here’s how you can launch MetaEditor.

Click the yellow diamond icon within MetaTrader.

 Launch MetaEditor from within MetaTrader 4

 

Otherwise you can open it from within the file system.

 Find MetaEditor.exe from the file system.

 

MetaEditor

Let’s take a quick look at the interface.

 

 The main window for writing EAs and Custom indicators

This is where the EA and Custom Indicator code is written. Notice the Compile button at the top. EAs and Custom Indicators must be compiled before they can be used in MetaTrader. Notice also the Terminal button. This allows you to launch MetaTrader from within MetaEditor.

 

 The Navigator

The Navigator contains a useful list of various MQL functions and code snippets.

 

 The Toolbox

A particularly useful area is the Toolbox. From here you can see if there are any errors in your code. You can also download existing EAs and Custom Indicators from the MQL4.com website.

In future articles we will look in more detail at MetaEditor, the mql4.com website and writing using the mql4 language.

Questions?  Feel free to ask them in the comment field.  

Comments

Disclaimer

Saxo Bank provides an execution-only service. The material on this website does not contain (and should not be construed as containing) investment advice or an investment recommendation, or a record of our trading prices, or an offer of, or solicitation for, a transaction in any financial instrument. Saxo Bank accepts no responsibility for any use that may be made of these comments and for any consequences that result.

Please read our full disclaimers:

Disclaimer

Saxo Bank provides an execution-only service. The material on this website does not contain (and should not be construed as containing) investment advice or an investment recommendation, or a record of our trading prices, or an offer of, or solicitation for, a transaction in any financial instrument. Saxo Bank accepts no responsibility for any use that may be made of these comments and for any consequences that result.

Please read our full disclaimers:
Feedback
Dismiss

Oops! There was a problem communicating with the TradingFloor.com servers Connection Error! {time} {code} {type} {message} .

Oops! There was a problem communicating with the OpenAPI servers.
Oops! There was a problem communicating with the Financial Calender servers.