Trade Currencies Online with Easy-Forex!

Posts Tagged ‘tutorial’

MetaTrader Indicators User’s Tutorial

Monday, January 7th, 2008

There are many free MetaTrader indicators available on-line, but some people still enounter problems in attaching these indicators to a chart or even compiling them when needed. This simple user’s tutorial was made by me for those that want learn attaching custom MT4 indicators.

1. Download custom MT4 indicator and save it to the ‘indicators’ folder inside the ‘experts’ folder inside your MetaTrader’s installation folder:

2. If it’s already compiled (.ex4 file) then fine, if not (.mql file) - double click it with your mouse and it will be opened in MQL editor (this editor is standard for every MetaTrader 4); click the ‘Compile’ button at the center top of the editor window - the indicator will be compiled and ready to be attached. There might be some errors or warnings during the compilation, but in most cases there shouldn’t be any. You can try and fix those errors, but usually it takes some time and programming skills to do this.

3. After you get the .ex4 file in your indicators folder (through compilation or download), you can start using it with your MetaTrader platform. All you have to do is to attach it to the chart. If you know what you are doing you might also want to change some of the indicator’s input parameters.

OK. Now you can enjoy your new MT4 indicator and hopefully - better
Forex trading results.

MetaTrader History Data Importing and Converting Tutorial for Quality Backtesting

Thursday, January 3rd, 2008

Backtesting MetaTrader expert advisors on historical data is a good way to test a strategy. But testing on the limited data supplied with MT4 installation gives a very poor quality of testing (usually below 50%). So, how to achieve a 90% quality in backtesting of MT4 expert advisors? It’s not that hard really, just follow this simple tutorial and you will able to test any MetaTrader EA.

1. Download a new MetaTrader 4 installation and install it to a separate folder. Be advised that a good MetaTrader historical data take up a lot of disk space, so install it to a drive with at least 1-2 Gbytes of free space. For download MT4 installation I recommend official MetaQuotes site.

2. After you install your MT4, don’t run it yet. Go to the folder you have installed it to. Go the ‘history’ folder there and delete all folders there (the actual folders names inside the ‘history’ folder may be different from those on these pictures):

3. Run the newly installed MetaTrader and open a free demo account with whatever broker it will be offering to you (official MetaQuotes installation offers random brokers for demo account opening in its MT4). Login to your account and close all open charts (if any).

4. Adjust the MetaTrader options to allow larger charts (more bars in history):
The close your MetaTrader.

5. Download a quality historical data for every currency pair you want to test your expert advisor on. I recommend Alpari History Center for this - download M1 data for each of the currency pairs you need.

6. Unzip the archive with M1 historical data somewhere. Rename it to comply with MT4 standard naming - i.e. EUR/USD M1 chart should be named EURUSD1.hst, GBP/USD M1 should be renamed to GBPUSD1.hst, etc.

7. Copy the renamed history file to your MetaTrader’s ‘history’ folder into your broker’s folder (overwrite if prompted):

8. Launch MetaTrader 4 again. Don’t open any charts on-line, open your downloaded M1 chart offline (example shown for EUR/USD chart):

9. It might take some time for the actual chart to load, but it’s OK. Now you need to convert M1 history to every timeframe you will need. For this you need to use a period_converter script which is a standard feature of all MT4 platforms. Run it from the Scripts tab and set its ExtPeriodMultiplier input parameter to the number of minutes in the desired output timeframe. For M5 enter 5, for M15 enter 15, for M30 enter 30, for H1 enter 60, for H4 enter 240, for D1 enter 1440, for W1 enter 10080, MN isn’t convertible as there is no fixed amount of minutes in one month:

10. Wait for the script to finish its work (may take up some time; it’s more than 2 years of data after all):

11. Repeat steps 8-10 for all timeframes you want to get.

12. Repeat steps 5-11 for all currency pairs you want to test your MT4 EAs on.

13. VoilĂ ! Now you can enjoy a 90% quality backtesting and test every expert advisor you want on the time periods of more than 2 years. Good luck with your trading!

Metatrader Expert Advisors - User’s Tutorial

Wednesday, July 11th, 2007

Using Metatrader expert advisors is simple, but sometimes people get confused with it and after downloading a file with the expert advisor a user might get stuck with it without knowing what to do next. This a simple tutorial on how to attach an expert advisor to Metatrader 4 char and activate it.

1. Download your MT4 expert advisor or copy it and save it to your Metatrader’s ‘experts’ folder:

Saving Metatrader 4 Expert Advisor
2. Double click it with your mouse and it will be opened in MQL editor (this editor comes with MT4). There will be a button ‘Compile’ at the center top of the window. Click it and your expert advisor will be compiled and ready to use. There might be some errors or warnings during the compilation, but in most cases there shouldn’t be any. You can try and fix those errors, but it takes time and some programming skills, usually.

Compiling Metatrader 4 Expert Advisor
3. Now, all you need to do is add your expert advisor to the preferred chart and activate it. You can also change some input parameters for the advisor in the Inputs tab:

Adding Metatrader 4 Expert AdvisorThat’s it! Now you can enjoy your expert advisor - its signals or its trading (if it is designed to perform trading). Good luck with them!



FXOpen - Forex at its Best