Hello there.
I found Amibroker way better than MetaTrader, for example, because of its multi-timeframe support. But there is no broker using Amibroker, so real-time forex data feed is difficult to reach. Digging the Net i discovered some code examples.. And here is my solution :
You can update in real time as many pairs as you want !
1. First, run Currency_Loader EA in MT4, it has to run on every pair you want to update. You can define timeframes to update and delay (between every update).
This EA is creating .csv files with quotes and update them frequently. (MT4folderdirectory->experts->files->export_history )
2. Now you have to put this data into Amibroker, and do it frequently. So I've created .bat and.js files. In .js file (open it via Notepad or Geany) define path to your updating .csv's. At the end of the loop you can set delay between updates in Amibroker (in msec.)
In .bat define path to your .js script.
It's done ! Now when you open Metatrader, data will be loaded to .csv. When you run (double click) .bat file, this docs will be saved in Amibroker database automatically (Ami must be opened too).
To make it easier, you can add shortcut in Amibroker menu. Just go to tools->customize->tools -> add new item (path to .bat file) .
When you want to upload many pairs (as I do) better is to set (In EA) a small number of bars loaded to .csv so loading data to Amibroker will be done nice.
And from time to time it's good to delete .csv that they won't grow too big.
EDIT:// Ahh I forgot about one thing. Ami uses it's own "formats", files that define which coulumn in .csv is for. When you want to update your database, you have to specify it first. In this case special .format file is needed too. You can create it on your own (for MT4 .csv's) or downlad and put to amibroker->formats folder.
EDIT2:// Also source might be helpful: http://www.amibroker.com/newsletter/02-2001.html
I found Amibroker way better than MetaTrader, for example, because of its multi-timeframe support. But there is no broker using Amibroker, so real-time forex data feed is difficult to reach. Digging the Net i discovered some code examples.. And here is my solution :
You can update in real time as many pairs as you want !
1. First, run Currency_Loader EA in MT4, it has to run on every pair you want to update. You can define timeframes to update and delay (between every update).
This EA is creating .csv files with quotes and update them frequently. (MT4folderdirectory->experts->files->export_history )
2. Now you have to put this data into Amibroker, and do it frequently. So I've created .bat and.js files. In .js file (open it via Notepad or Geany) define path to your updating .csv's. At the end of the loop you can set delay between updates in Amibroker (in msec.)
In .bat define path to your .js script.
It's done ! Now when you open Metatrader, data will be loaded to .csv. When you run (double click) .bat file, this docs will be saved in Amibroker database automatically (Ami must be opened too).
To make it easier, you can add shortcut in Amibroker menu. Just go to tools->customize->tools -> add new item (path to .bat file) .
When you want to upload many pairs (as I do) better is to set (In EA) a small number of bars loaded to .csv so loading data to Amibroker will be done nice.
And from time to time it's good to delete .csv that they won't grow too big.
EDIT:// Ahh I forgot about one thing. Ami uses it's own "formats", files that define which coulumn in .csv is for. When you want to update your database, you have to specify it first. In this case special .format file is needed too. You can create it on your own (for MT4 .csv's) or downlad and put to amibroker->formats folder.
EDIT2:// Also source might be helpful: http://www.amibroker.com/newsletter/02-2001.html
Attached File(s)
Currency_Loader.mq4
28 KB
|
2,154 downloads
Currency_Loader.ex4
33 KB
|
1,755 downloads
IMPORTER.rar
1 KB
|
2,272 downloads
Datamt4.rar
< 1 KB
|
2,186 downloads