After learning all about MT4 and MQL language, I thought “MT4 is MT Shit”, too many limitations and I know AFL way better than MQL. Besides that the Amibroker back tester is far superior to the MT4 back tester. I’ll do my system up in Ami and send the order to MT4.
Here are the steps to do this:
By the way, I’m using this on Windows 7 64 bit.
Notice the {Field}!{Ticker} – Field is first, when you open up this window for the first time, these fields are reversed.
Add the symbol to Amibroker, the same as it appears in MT4, some brokers add some stuff after the symbol, mine was only EURUSD for example. So I added EURUSD to Amibroker. Once you see the green box at the lower right side of Ami, add the symbol to the real time feed and watch the quotes come in.
In MT4, you have to enable the “DDE Server”. Go to “Tools->Options” and check the box.
To see errors, look at the MT4 "Journal" tab. View->Terminal, then goto the new thingy that just opened and click the Journal tab. You might see some errors that begin with "DDE......"
If you have any questions, use Google first, than ask me if your stuck.
Here are the steps to do this:
- Load historical data into Ami (See this post Forex MSN Data)
- Get streaming data from MT4 to Amibroker
- Find or make AFL and MQL files to interact between the two platforms. I found an MQL file (on a forum) that will read a text file. Now I just need to make the trading system AFL write the text file. I’ll make this code as an AFL include file.
By the way, I’m using this on Windows 7 64 bit.
Notice the {Field}!{Ticker} – Field is first, when you open up this window for the first time, these fields are reversed.
Add the symbol to Amibroker, the same as it appears in MT4, some brokers add some stuff after the symbol, mine was only EURUSD for example. So I added EURUSD to Amibroker. Once you see the green box at the lower right side of Ami, add the symbol to the real time feed and watch the quotes come in.
In MT4, you have to enable the “DDE Server”. Go to “Tools->Options” and check the box.
To see errors, look at the MT4 "Journal" tab. View->Terminal, then goto the new thingy that just opened and click the Journal tab. You might see some errors that begin with "DDE......"
If you have any questions, use Google first, than ask me if your stuck.
I'm looking forward to hear more about sending orders to MT4 from Ami. I already use Mt4 as FX data source and am connecting AB to MT. I don't really like MT4 so a better solution to connect to my broker would be better. But for now I must live with that and accept MT4 sending data through DDE to Ami. I've also made a backfill script since DDE doesn't provide that by nature. So it's better than nothing. But I'm working on a plugin to connect to my broker since AB provides a free development kit. But it's a project being at an early stage
ReplyDeleteYeah that's for now.
Best regards
Would you be willing to share the backfill script here? I can post it and write some instructions for use.
ReplyDeleteCan you elaborate of the plug-in your working on?
Brian, I will get back to you regarding this topic in a few days. This week I'm quite busy.
ReplyDeleteBest regards
Hi,
ReplyDeleteI really found this post very useful and i was trying since long to utilise it on Windows7 platform. Thanks for it. I am getting quotes for forex data but not for commodities.
Hi,
ReplyDeleteyou can use "Rateserver" for MT4 to Ami, with Backfill.
http://www.marketcalls.in/amibroker/mt4-plugin-for-amibroker.html
To order from Ami, use a simple textfile, that you write with ami and read with MT4.
like: "buy;stoploss,takeprofit..."
e.g. "buy;95;120"
Best regards
Rateserver doesn't work on my Windows 7 64 bit machine. I would have liked to use it since it has backfill. Perhaps I'll try it again, I didn't spend to much time on it.
ReplyDeleteI have the order part working from Amibroker to MT4, but it's basic and I haven't tested it yet. I can post what I have so far if anyone want it.
The other thing is that both Amibroker and MT4 have to be on the same timeframe.
ReplyDeleteI use Rateserver with 5min Timeframe im MT4 and Ami. In Ami only the "base time interval" has to be the same. In the ami-chart you can use then any timeframe. To order with a text-file I use a second EA in MT4.
ReplyDeleteYou don't need rateserver and that plug-in for backfill of MT4 DDE connection. Just DDE plugin plus export and import script
ReplyDeleteHello,
ReplyDeleteIs backfill possible with this approach of using DDE? If so can you please let me know how to do it? I'm struggling to figure this out.
Thanks
You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! Compare Bitcoin Cash Brokers
ReplyDeleteGet fast supply of each conceivable assistance from organization: A venture or industry has such a significant number of workers on the board. machine learning course
ReplyDelete