You are on page 1of 8

DataFeed from Metatrader

written by Ramil Khalikoff, Robert Rundle, Chang Zhi Dai, Alon Awramson 
 

Timing Solution software is able to work with many different data formats. One of popular data sources is client's
terminal MetaTrader4; it provides real-time data stream. FOREX traders are especially interested in Currency Loader
advisor written for MT4. This advisor has just one purpose: to download quotes from MT4 in real-time format. It can
be used by different software programs, including Timing Solution (TS).  
General block diagram of MetaTrader + Timing Solution real time streaming

Settings
МТ4 advisor "Currency Loader" provides historical data for any chosen financial instruments. It downloads the data
into "*.csv" files. These files are updated in real time; the frequency of the updates is defined in seconds, as a
parameter FrequencyUpdate (by default, its value is 60, i.e. the data are updated every minute). BarsMin parameter
shows the minimum amount of price bars available on the diagram before any update is possible. By default it is 100
(i.e. there will be no downloading data if the data file contains less than 100 bars). There is another parameter there,
MaxBarsInFile. It defines the maximum amount of price bars that can be loaded into the file. The default value is
20,000. Remember this number; you will have to change it depending on available history data and properties of your
computer. For example, if you need the minute data for some instrument that has 800,000 price bar history and your
computer is rather old, your computer might be frozen.

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


Default settings:

LoadM1 = false;
LoadM5 = false;
LoadM15 = false;
LoadM30 = false;
LoadH1 = True;
LoadH4 = True;
LoadD1 = True;
LoadW1 = True;
LoadMN = True;

(Comment by Robert Rundle I only build data files in the timeframes that will be use in TS. There is no point in creating data
files (timeframes) that you will not use in your live research. Here I use 1, 5 & 60 minute, & Daily only for TS. And because - I
can delete it before I start TS so that data is fresh and seamless just in case there are gaps or overlaps of data. Fault of
‘currency converter’. This configuration can then be saved by name, and later these parameters can be applied to a different
currency.)

These parameters allow/forbid data downloading. If the parameter is set as True, the data downloading is allowed. If it
is set as False, no downloading. You can change the settings any time.
Also, these commands are useful:
AllowInfo - the information re Advisor;
AllowLogFile - recording of the information into log-file.

How to work with Currency Loader for МТ4

      1) Unpack Currency_Loader file (Currency_Loader V2.3.ex4 file) into  \experts folder. The \experts
folder is a place on your computer where MetaTrader software stores the experts files.

In order to find where \experts directory is located on your computer, make RIGHT mouse click on
MetaTrader shortcut, choose the Properties item there:

    You will get the information box like this:

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


      

    You see in my computer the MetaTrader program is installed in  c:\Program Files (x86)\GCI MT4\
accordingly the folder for experts is  c:\Program Files (x86)\GCI MT4\experts\

This is an example of another directory: C  c:\Programs (x 86) \ MetaTrader – Finexo\experts\

This path depends on the version of MetaTrader that is installed on your computer.

    

Troubleshooting #1
We recommend to run MetaTrader as Administrator, this way:

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


Make a RIGHT mouse click on MetaTrader shortcut and highlight the item "Run as administrator".
Otherwise you may face a problem of updating the price history in teal time.

.   2) Open program MetaTrader, the Currency_Loader should be there.

      3) Drag Loader to the main MetaTrader screen, and the Currency_loader will appear at the right top
corner.

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


Please make sure that Expert Advisors at the top menu has a green spot as below rather than a red spot
to make sure Currency_Loader at the right_up corner comes with a smiling face .

4) The program starts downloading the price history and stores these files into \experts\files\Export_History\ folder.

In other words, my version of MetaTrader is installed in c:\Program Files (x86)\GCI MT4\  directory, and the
files with updated price history will be located in:

c:\Program Files (x86)\GCI MT4\experts\files\Export_History\  folder.

Troubleshooting #2
Different versions of Currency Loader can store the files in different directories. In our example this folder is used:
\experts\files\Export_History\ folder.

It also can be  \experts\files\Export_History\EURUSD\ folder (a special folder for each financial instrument)

or ...\experts\files\history_center\  folder.

It is better to check this directory manually, i.e. run currency loader and check the folders in \experts\files\... folder.

Troubleshooting #3
It starts working very soon, you should wait only about a minute after the download. The delay is related to the
connection between the terminal and the server and the necessity to update all already opened diagrams. IF YOU USE
THE LOADER FOR TOO MANY INSTRUMENTS AT THE SAME TIME, YOUR TERMINAL MIGHT BE
FROZEN.
(Comment by Robert Rundle I do a shortcut from desktop to this folder so I can delete it before I start TS so that data is fresh
and seamless just in case. RR)

       You can also store the price history into any folder. In order to do that:

a.        Press F2 (from Tools at the top menu, then History Centre):

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


b.      Double click on 30 Minutes (M30) folder AUSUSD (as example). Click Export button to save the
file with the price history:

   

You can download this file in Timing Solution in a regular way:

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


   

       
Real Time Streaming"  Timing Solution + Currency Loader

      You can use the Currency Loader as the source of real time streaming for Timing Solution. To do that:  

6) Run Timing Solution software, download the existing price history and  open Data Feed module clicking button:

      7) Highlight "From File" item there and click "Data Feed File" button:

8) Choose data feed file from  \experts\files\Export_History\  folder;   in our example it will be 

c:\Program Files (x86)\GCI MT4\experts\files\Export_History\  folder.

9) Set the speed of update:

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]


(Comment by Robert Rundle SET INTERVAL EVERY 60 SECONDS, AS TS GETS A LITTLE FREEZY FOR A FEW SECONDS)

9) To run real-time regime streaming, click or double-click on this symbol, it must be green:

  

Websites where you can download MataTrader software and open account:

I am now using meta trader (http://www.ibfx.com/Platform/Forex-Trading-Platform a free demo account and a live
trading account for pc or smart phones)

http://www.timingsolution.com/TS/Mini/34/index.htm[4/3/2012 9:36:04 PM]

You might also like