*** MT5 version of this plugin is available as well ***

General Information About The Plugin

Minimum supported version of Amibroker is 5.27

Plugin doesn't support Windows XP, Windows Server 2003 or any earlier


Plugin Installation

Plugin's installation package consists of three files:

  • Amibroker Plugin - MT4Plugin.dll
  • Metatrader extension - MT4QuotesExt.dll
  • Metatrader 'Expert Advisor' - QuotesFeedSrv.ex4

1. Copy MT4Plugin.dll to C:\Program Files (x86)\Amibroker\Plugins

2. Copy both MT4QuotesExt.dll and QuotesFeedSrv.ex4 to Metatrader's Experts directory (this directory can be found by choosing File -> Open Data Folder menu entry) and then go to MQL4/Experts).

3. Close Amibroker (if it was open) and start again

Amibroker Database Configuration:

  1. File -> New -> Database
  2. Enter database name (for example: 'MT4Data') and uncheck 'Load database at startup'
  3. Press 'Create'
  4. As a Data Source choose 'MT4 Plugin'
  5. Enter number of bars - 100.000 minimum, for 1min interval it is better to set more, like 200-300 thousands
  6. Choose desired interval - like 1h
  7. Press 'OK'

You can find more detailed information about Database Settings and Intraday Settings here. Intraday to EOD compression is described here. Global Intraday settings are described here (in 'Intraday tab' section).


Further Metatrader Configuration

Plugin will feed data for symbols that are in the Market Watch window during QuotesFeedSrv Expert startup. Prior to starting QuotesFeedSrv Expert you have to add all needed symbols to Market Watch window by right-clicking on this window and selecting 'Symbols' option and choosing the symbols you need.

In Metatrader it is the best to create separate chart window dedicated just to QuotesFeedSrv Expert, then from Experts folder drag QuotesFeedSrv onto this window (here EURUSD,H1 is the window dedicated to our Expert):

QuotesFeedSrv

'Allow DLL imports' needs to be checked, then you have to press 'OK':

QuotesFeedSrv

It is advised to just minimize QuotesFeedSrv Expert window and don't make any operations on it (like change symbol or interval), because it will restart the expert and it will influence the way plugin works.


Further Amibroker Configuration

Start Amibroker and enter any symbol that is available in the Market Watch window of Metatrader of your broker, like 'EURUSD' and confirm that you want to add this symbol to database, in a short moment chart should be populated with fetched data. In case of tickers containing lower-case letters you have to check 'Case-sensitive ticker symbols' option in Tools->Preferences->Miscellaneous menu of Amibroker and enter the symbol using correct letter casing.

MT4Plugin for Amibroker

Historical Data Backfill

Backfill is started by right-clicking on the status menu Backfill submenu (green "OK" in the bottom right corner). In order for the plugin to fetch historical data earlier than the data fetched after initial addition of a symbol you have to force Metatrader to fetch history of a symbol by opening a chart with this symbol and in the same interval as in Database Settings (as opposed to interval on Amibroker chart window), and by repeatedly pressing 'PgUp' (Page Up) button on your keyboard, or just by holding it for a dozen or so seconds - Metatrader will fetch it's history from the broker server. Alternatively you can download all available history from MetaQuotes servers using Tools->History Center. Then by choosing Backfill for the specific symbol plugin will fetch its history to Amibroker (you may need to repeat backfill if there is a lot of data)

MT4Plugin Backfill Menu

Contact: amitoolbox@gmail.com