Amibroker real-time data feed from MT4

#1
Hello there.
I've got an idea how to get free real-time data feed from MetaTrader to amibroker. It's easy and simple.
First, save quotes to .csv file and repeat that action, so this .csv will allways be up to date.
Second, save quotes from that file to amibroker database every minute (or longer) to get fresh data.
I've done already first step, and if you will help me, I can share with script for Metetrader (it's simple EA)
But I need your help with second step... I don't know C++ and haven't got time to learn it.
This program has to save files from entered directions (for example, 4 files from 4 quotes) and repeat this every minute (it should be definable too) .
I think this should be easy. If you don't know how to start, I've got T. Janeczko script which is downloading EOD data and then saving it to amibroker. So I think you can change some lines in it..
Who can help? !
 
#2
Ok, so I've helped myself ;)

Tip how to export .csv and import it into amibroker !

-compile in mteditor currency_loader and load it as EA to preferred currency (time interval isn't important, cos this can export every timeframe ! )
-now your .csv files will be saved in experts/files/export_history
-in import.js define path to .csv you want to import (it's inside the loop, so you can copy import function and add path for each timeframe you want )
- in importer.bat define path to import.js
-run amibroker , open your database
-run Metatrader with loaded EA
-now when you run importer.bat live quotes will be loaded every 2 minutes to amibroker! (you can change the time of course)

Remember that in currency_loader you can choose which timeframe you want to save in .csv . You can run this EA for few currencies in the same time !

To sum up: You can save every timeframe from every currency at the same time, running just 1 program !

http://www.mediafire.com/?d6nl7bj71do1x6r
 
#5
Thanks a lot, I was thinking of building something like this and you just saved me a lot of time...
Many Many thanks......I just downloaded it.
I want to know that Do you have the super scalper afl? I am using Trend Blaster but not that much happy.
 

jahan

Well-Known Member
#6
Ok, so I've helped myself ;)

Tip how to export .csv and import it into amibroker !

-compile in mteditor currency_loader and load it as EA to preferred currency (time interval isn't important, cos this can export every timeframe ! )
-now your .csv files will be saved in experts/files/export_history
-in import.js define path to .csv you want to import (it's inside the loop, so you can copy import function and add path for each timeframe you want )
- in importer.bat define path to import.js
-run amibroker , open your database
-run Metatrader with loaded EA
-now when you run importer.bat live quotes will be loaded every 2 minutes to amibroker! (you can change the time of course)

Remember that in currency_loader you can choose which timeframe you want to save in .csv . You can run this EA for few currencies in the same time !

To sum up: You can save every timeframe from every currency at the same time, running just 1 program !

http://www.mediafire.com/?d6nl7bj71do1x6r
hello,

there is already a dll plugin available for importing realtime data to Ami from Mt4 no need to backfill everytime it will backfill automatically.....just visit marketcalls.in and search for Mt4 plugin if u find any difficulty just let me know i will help u out.

regards,
jahan.
 
#7
Hello Jahan,

I tried very hard to install MT4 and run the plugin. But could not succeed. I got the following steps. But not worked.

and where do I download MT4 from.

[setup]
1.copy MT4d.dll to C:\Program Files\AmiBroker\Plugins
2.copy RateServer.exe to C:\Program Files\AmiBroker
3.open dos prompt and enter command
[cd C:\Program Files\AmiBroker]
[rateserver.exe /regserver]
4.copy exp.dll to C:\Program Files\MetaTrader 4\experts\libraries

5.copy exp.mqh to C:\Program Files\MetaTrader 4\experts\include
click exp.mqh and compile
6.copy exportfb.mq4 to C:\Program Files\MetaTrader 4\experts
click exportfb.mq4 and compile
7.run metatrader4, then RateServer is displayed in tasktray
run exportFB Expert Advisor
* check Allow DLL imports

8.run Amibroker

9.click amibroker and click [File]-[Database setting]
select Datasource MetaTrader4 data Plug-in

and set Base time interval
1Minute or Hourly or EOD
10.[Symbol]-[New] add symbol
USDJPY,GBPJPY... so on

11.click connect and turn green
then reteserver is displayed.
 
#8
I know rateserver, but for me it wasn't working. So I found this solution, it's fully supported by Amibroker's founder. What is more, it is easy to understand and customize it.
I was working for a while with it and here is my final product:

I posted it on forexfactory (I don't know if I can post link to this forum)

http://www.forexfactory.com/showthread.php?t=435902

there are also updated files : )
 

bharatk8

Active Member
#9
this works with WndowsXP
Hello Jahan,

I tried very hard to install MT4 and run the plugin. But could not succeed. I got the following steps. But not worked.

and where do I download MT4 from.

[setup]
1.copy MT4d.dll to C:\Program Files\AmiBroker\Plugins
2.copy RateServer.exe to C:\Program Files\AmiBroker
3.open dos prompt and enter command
[cd C:\Program Files\AmiBroker]
[rateserver.exe /regserver]
4.copy exp.dll to C:\Program Files\MetaTrader 4\experts\libraries

5.copy exp.mqh to C:\Program Files\MetaTrader 4\experts\include
click exp.mqh and compile
6.copy exportfb.mq4 to C:\Program Files\MetaTrader 4\experts
click exportfb.mq4 and compile
7.run metatrader4, then RateServer is displayed in tasktray
run exportFB Expert Advisor
* check Allow DLL imports

8.run Amibroker

9.click amibroker and click [File]-[Database setting]
select Datasource MetaTrader4 data Plug-in

and set Base time interval
1Minute or Hourly or EOD
10.[Symbol]-[New] add symbol
USDJPY,GBPJPY... so on

11.click connect and turn green
then reteserver is displayed.