Problems getting IB to autotrade with MC

Questions about MultiCharts and user contributed studies.
George Hovorka
Posts: 7
Joined: 16 Nov 2011

Problems getting IB to autotrade with MC

Postby George Hovorka » 16 Nov 2011

I have a strategy which works on the Euro FX chart but I am not able to autotrade with Traders Workstation. The signal is coming in from E-Signal, using MC 7.2 beta and latest version of Traders Workstation.

I have set up Multicharts as follows:

1) MC trades through the Traders Workstation OK with the Trade Bar with the EUR.USD instrument. So basic communications is working between the programs.

2) With the Quote Manager the exchange listed was changed to Idealpro.

3) Under strategy properties the “Require Order Conformation” check box was checked off.

4) On the Traders Workstation side under FX trading “Transmit Instantaneously” was checked on.

5) On the MC side for IB general settings the server is set to 127.0.0.1 and the port is 7496.

Something is missing which is preventing the Traders Workstation getting signals. Any suggestions would be greatly appreciated.

Thanks, George

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Problems getting IB to autotrade with MC

Postby TJ » 16 Nov 2011

George Hovorka wrote:I have a strategy which works on the Euro FX chart but I am not able to autotrade with Traders Workstation. The signal is coming in from E-Signal, using MC 7.2 beta and latest version of Traders Workstation.

I have set up Multicharts as follows:

1) MC trades through the Traders Workstation OK with the Trade Bar with the EUR.USD instrument. So basic communications is working between the programs.

2) With the Quote Manager the exchange listed was changed to Idealpro.

3) Under strategy properties the “Require Order Conformation” check box was checked off.

4) On the Traders Workstation side under FX trading “Transmit Instantaneously” was checked on.

5) On the MC side for IB general settings the server is set to 127.0.0.1 and the port is 7496.

Something is missing which is preventing the Traders Workstation getting signals. Any suggestions would be greatly appreciated.

Thanks, George


In the Strategy Properties,

under the Auto Trading tab

look at the bottom of the page:

Select Broker Plug-in

make sure you have the proper settings.

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 16 Nov 2011

Thank you for your suggestion.

Here are my settings for the IB broker plug-in

Server 127.0.0.1
Port 7496
Client ID 0

TIme in Force is Day

OCO Group use native is checked
Unrealized profit by best is checked

Everthing else is un-checked

Possibly the Client ID set to 0 is the problem?

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Problems getting IB to autotrade with MC

Postby TJ » 16 Nov 2011

It's been a long time since I configure my settings.

Can your MultiCharts get chart data from TWS?
ie. is your MultiCharts talking to TWS?

Have you enabled your API?
Set your trusted IP address to 127.0.0.1

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 16 Nov 2011

Very good suggestions!

So I have made two changes so far:

On the IB side I have made 127.0.0.1 a trusted IP address. While I was there I verified that Enable Active X was checked "on" and the socket port was set to 7496

Then on the MC side in the Broker Plug In I added my account number to the client ID and also verifed that the socket was set to 7496.

I verified the connection between the MC and IB using the chart trading feature but using IB as the chart source rather than E-Signal is also a good idea too.

I guess there is no direct way to test the trading connection other than waiting around for MC to originate a trade based upon my code listing?

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Problems getting IB to autotrade with MC

Postby TJ » 16 Nov 2011

George Hovorka wrote:Very good suggestions!

So I have made two changes so far:

On the IB side I have made 127.0.0.1 a trusted IP address. While I was there I verified that Enable Active X was checked "on" and the socket port was set to 7496

Then on the MC side in the Broker Plug In I added my account number to the client ID and also verifed that the socket was set to 7496.

I verified the connection between the MC and IB using the chart trading feature but using IB as the chart source rather than E-Signal is also a good idea too.

I guess there is no direct way to test the trading connection other than waiting around for MC to originate a trade based upon my code listing?

You can open a paper trading account at IB. Just go to account management and you can activate it immediately. Your paper trading account will have exactly the same privilege as your real account, and it will have real live feed and will process your orders exactly as if you were trading real. You can use this account to test out your trading strategies.

You can also use IB's demo system. (it is avaiable from IB's website).
The demo system is active 24 hours a day. But it does not stream real data. The advantage is, you can test your system outside of trading hours.
There is no registration required for the demo system.
These users thanked the author TJ for the post:
JoshM

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 16 Nov 2011

That is exactly what I am doing: using a demo account. So it would appear that once I get the auto trading working here I can directly translate these settings over to a live account.

User avatar
TJ
Posts: 6523
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 957 times
Been thanked: 1883 times

Re: Problems getting IB to autotrade with MC

Postby TJ » 16 Nov 2011

George Hovorka wrote:That is exactly what I am doing: using a demo account. So it would appear that once I get the auto trading working here I can directly translate these settings over to a live account.

You should test out your strategies in the paper trading account before going live.

The demo account is two steps from reality.

They are 2 different animals.
These users thanked the author TJ for the post:
JoshM

User avatar
JoshM
Posts: 2075
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1523 times
Been thanked: 1480 times
Contact:

Re: Problems getting IB to autotrade with MC

Postby JoshM » 17 Nov 2011

George Hovorka wrote:Then on the MC side in the Broker Plug In I added my account number to the client ID and also verifed that the socket was set to 7496.

I don't know if I follow you completely, but where did you need to manually enter your account number? Auto trading with the IB paper trading demo is working here fine last time I checked, and I have just these settings:

screenshot.165.png
TWS settings
screenshot.165.png (14.71 KiB) Viewed 215 times

screenshot.166.png
MultiCharts settings
screenshot.166.png (13.81 KiB) Viewed 212 times


(But I'm running MC7.0, and not the latest beta, so it could be changed.)

George Hovorka wrote:I guess there is no direct way to test the trading connection other than waiting around for MC to originate a trade based upon my code listing?

You could try to manually enter a chart through Chart Trading on the same chart on which you've applied your strategy, and that manual trade should execute if the IB/MC connection is okay. If not, the Order and Position Tracker log should give a reason for the trade failure.

Regards,
Josh

User avatar
Henry MultiСharts
Posts: 8397
Joined: 25 Aug 2011
Has thanked: 1201 times
Been thanked: 2686 times

Re: Problems getting IB to autotrade with MC

Postby Henry MultiСharts » 17 Nov 2011

George Hovorka wrote:I have a strategy which works on the Euro FX chart but I am not able to autotrade with Traders Workstation. The signal is coming in from E-Signal, using MC 7.2 beta and latest version of Traders Workstation.

I have set up Multicharts as follows:

1) MC trades through the Traders Workstation OK with the Trade Bar with the EUR.USD instrument. So basic communications is working between the programs.

2) With the Quote Manager the exchange listed was changed to Idealpro.

3) Under strategy properties the “Require Order Conformation” check box was checked off.

4) On the Traders Workstation side under FX trading “Transmit Instantaneously” was checked on.

5) On the MC side for IB general settings the server is set to 127.0.0.1 and the port is 7496.

Something is missing which is preventing the Traders Workstation getting signals. Any suggestions would be greatly appreciated.

Thanks, George

Hello George.
Please attach a screenshot of the symbol mapping window.
File -> Broker profiles -> Symbol mapping -> IB broker from the list

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 17 Nov 2011

First I would like to thank everyone for all the great suggestions.

I matched the screen shots to my settings and the only important difference was that I had set the client ID to my account number rather than zero so I set it back to zero.

The only other difference I noticed was at the bottom of the IB broker window (Viewed inside MC), my unrealized profit calculation was set to "buy best bid" rather than "buy last trade". Frankly I am not sure what either of these mean and if they effect basic autotrading?

So my hope this that I have the symbol list incorrectly configured.

It is attached as a pdf file.

Thanks, Goerge
Attachments
symbol mapping list.pdf
Symbol Mapping Screen Shot
(76.25 KiB) Downloaded 48 times

User avatar
Henry MultiСharts
Posts: 8397
Joined: 25 Aug 2011
Has thanked: 1201 times
Been thanked: 2686 times

Re: Problems getting IB to autotrade with MC

Postby Henry MultiСharts » 18 Nov 2011

The symbol mapping is incorrect. eSignal symbol exchange is also incorrect.

You need to have symbols added both from data feed and broker.
Please re-add the symbols from the data source:
In the Quote manager go to Instrument tab->Add symbol->From data source-> IB.
Then do the same for eSignal symbols.

To do the symbol mapping you need to do the following:
Go to the File->Broker profiles->Symbol mapping.
Select your broker IB. Click Add.
In the left column select the eSignal data feed symbol (EUR A0-FX).
In the right column select the symbol from the IB broker (EUR.USD).
Please have a look at the attached screenshot.
Attachments
EUR A0-FX-EUR.USD.png
EUR A0-FX-EUR.USD.png (9.27 KiB) Viewed 206 times

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 18 Nov 2011

Very good, so I went in and edited both the Quote manager and the symbol map and I have my screen in the symbol map looking exactly like your top line from your screen shot:

EUR.A0-FX; Forex;FX,esignal EUR.USD;Forex;IDEALPRO;Interactive Brokers

Now the next line on your symbol map:

EUR.USD;Forex;IDEALPRO;Interactive Brokers EUR.USD;Forex;IDEALPRO;Interactive Brokers

I believe I don't need because this would cause both the chart and the broker being provided by IB which I don't want since I want the signal to be coming in from e-signal.

Do I have this correct or does this second line have some other purpose?

User avatar
Henry MultiСharts
Posts: 8397
Joined: 25 Aug 2011
Has thanked: 1201 times
Been thanked: 2686 times

Re: Problems getting IB to autotrade with MC

Postby Henry MultiСharts » 18 Nov 2011

George Hovorka wrote:EUR.USD;Forex;IDEALPRO;Interactive Brokers EUR.USD;Forex;IDEALPRO;Interactive Brokers
I believe I don't need because this would cause both the chart and the broker being provided by IB which I don't want since I want the signal to be coming in from e-signal.
Do I have this correct or does this second line have some other purpose?

Yes that is correct. This line is for IB to IB trading.

George Hovorka
Posts: 7
Joined: 16 Nov 2011

Re: Problems getting IB to autotrade with MC

Postby George Hovorka » 18 Nov 2011

Thanks again and I'll let you know what happens.....


Return to “MultiCharts”