Tuesday, February 14, 2012

Interactive Brokers, MSN, and Forex Data to Amibroker

This post may also be helpful – How to Get Forex Quotes from MSN into Amibroker

If you use IB, Amibroker, and TWS to trade Forex, chances are you have been confused with the data feed from IB.  Yu might have asked yourself “How do I get daily data from MSN and mix it with intraday data from IB on the same chart?”  I hope you didn’t answer yourself, at least out loud!!  You could enter EURUSD as a symbol in Amibroker and download daily data from MSN.  Then you could enter EUR.USD-IDEALPRO-CASH as a symbol so you can trade it from the Amibroker charts using Tipster Trendlines.  But the silver bullet would be to have both data sources on the same chart, and be able to use that chart to place and modify orders.

Why would anybody want to do this?  Because I trade Supply and Demand zones and I always look at the weekly and daily zones.  They tell me where I am in the universe.  Placing a trade with only 1 month of data is not a good idea, its a bad idea. 

This is how you do it.

Goto: File->Database Settings->Intraday Settings and make sure “Allow mixed EOD/Intraday data” is checked.  See below.

image

Then enter a new symbol EUR.USD-IDEALPRO-CASH and delete the symbol EURUSD if it exists.  If EURUSD exists, the data from MSN will go to that symbol and not where we want it to go.

Goto: Symbol->Information and enter the inputs below

Alias: EURUSD

image

You can also enter the ticksize and point value, this is helpful if you are using TipsterTrendlines.

Save you work: File->Save ALL

Turn off the data feed from IB TWS or close TWS (bottom right corner of Amibroker, right click, select Disconnect)

Open Amiquote Tools->Auto update quotes

Select the dates – try to load one year to start with.  If you select to much data it will not work.  You can do something like 2 years at a time to get a large database.

Select MSN Historical as the data source

Make sure Automatic Import is checked.

Start it by pressing the green triangle on the menu

After it finishes, click on EURUSD in Amiquote to make sure the data was downloaded, a text box will open showing a bunch or quotes.

Then go to Amibroker and select daily timeframe for EUR.USD-IDEALPRO-CASH and you should see a huge chart. 

Turn on the TWS data feed.

Then select the smallest timeframe and you will see data from IB, streaming.

You might notice that you can see daily data back more than 3 months but if you switch to hourly you wont have that much data.  The IB data feed length depends on the number of days to download and the period you selected for the IB database in the database setup.  This should be enough o get you started.

If you use Amibroker, I suggest you check out TipsterTrendines, the current users love it.  It sends your order instantly based on line you draw on the chart.  It’s a cheap solution compared to entering the wrong numbers in TWS.

Hope this help.  Spread the word in the forums.

1 comment:

  1. Thank you Brian!
    Very useful info.
    Good site. Keep up the good work

    ReplyDelete

Let's hear what you have to say!

Disclaimer

The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.