Autotrading and IB
-
- Posts: 6
- Joined: 30 Mar 2012
Autotrading and IB
Having trouble setting up MC 7.4 to autotrade with my IB account. Every time the signal triggers an order, IB disconnects, the order is rejected on MC, another order is sent, rejected, etc, until IB reconnects and then all of the orders that were rejected in the 5 sec that IB was reconnecting, execute so I have way too big of a position in relation to my signal. I also get a popup in TWS that says order rejected session closed. I spoke to IB, and they said the disconnection was not on their end, surprise, and that popup is not an IB message but coming through the API Never had any problem with TWS disconnecting before. Tried SA, AA, nothing seems to work. Any help would be greatly appreciated.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Autotrading and IB
It would be helpful if..
- .. you could post a screenshot of the error,
- .. the message in the Order & Position Tracker (i.e. what does it say when it gets disconnected?)
- Does it only disconnect with automated trading or also with manual trading?
- Have you checked your IB broker profile settings? And the strategy properties?
- If orders are rejected by IB, it might be caused by the settings in TWS -> menu Global Configuration -> Presets -> [Instrument class you trade ] -> then Precautionary Settings. Alternatively, you could check your API & Precautionary behaviour in Global Configuration -> API -> Precautions.
-
- Posts: 6
- Joined: 30 Mar 2012
Re: Autotrading and IB
Thanks for the response JoshM
- Posted below are screenshots of Order/Position Tracker in MC during the problem and Log of disconnects
- I never had any disconnects when manual trading, at least not at this frequency.
- Checked settings at Broker Profile, strategy prop, etc, nothing out of the ordinary there
- Checked precautionary settings and caps in Presets and API on TWS, nothing that should reject the order
This is is going to sound stupid but, it's almost like TWS goes into a sleep mode, and when and when an order comes from MC, it catches up and tries to execute all the orders. For example yesterday I had an order to short go through it was rejected, because TWS disconnected, so MC tried again and in the span of TWS reconnecting, say 10-15 secs, MC had tried 11 times to get that order through, once TWS reconnected, it executed all 11 orders from MC, so strategy has me short 1 contract, TWS has me short 11
- Posted below are screenshots of Order/Position Tracker in MC during the problem and Log of disconnects
- I never had any disconnects when manual trading, at least not at this frequency.
- Checked settings at Broker Profile, strategy prop, etc, nothing out of the ordinary there
- Checked precautionary settings and caps in Presets and API on TWS, nothing that should reject the order
This is is going to sound stupid but, it's almost like TWS goes into a sleep mode, and when and when an order comes from MC, it catches up and tries to execute all the orders. For example yesterday I had an order to short go through it was rejected, because TWS disconnected, so MC tried again and in the span of TWS reconnecting, say 10-15 secs, MC had tried 11 times to get that order through, once TWS reconnected, it executed all 11 orders from MC, so strategy has me short 1 contract, TWS has me short 11
- Attachments
-
- Order Errors.jpg
- (758.16 KiB) Downloaded 381 times
-
- Posts: 6
- Joined: 30 Mar 2012
Re: Autotrading and IB
Screenshot of disconnections
- Attachments
-
- IB Disconnections.jpg
- (714.12 KiB) Downloaded 380 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Autotrading and IB
What version of TWS are you running ?
What account type do you have (regular or financial advisor)?
Have you installed an updater for IB datafeed/broker from this link?
Is "Require order confirmation" option disabled in Format-Strategy properties->Auto trading?
Are you able to place orders manually from this chart? Please attach a screenshot of your symbol mapping window (File -> Broker profiles -> Symbol mapping -> IB).
What account type do you have (regular or financial advisor)?
Have you installed an updater for IB datafeed/broker from this link?
Is "Require order confirmation" option disabled in Format-Strategy properties->Auto trading?
Are you able to place orders manually from this chart? Please attach a screenshot of your symbol mapping window (File -> Broker profiles -> Symbol mapping -> IB).
-
- Posts: 6
- Joined: 30 Mar 2012
Re: Autotrading and IB
TWS version 924.3a
Financial Advisor
I have downloaded hotfix update
Require order confirmation is disabled
I am able to place orders manually from the chart
Financial Advisor
I have downloaded hotfix update
Require order confirmation is disabled
I am able to place orders manually from the chart
- Attachments
-
- Symbol Mapping.jpg
- (54.53 KiB) Downloaded 363 times
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Autotrading and IB
Hello James,
Please import the attached registry key AllTracesON to ensure that MultiCharts logs are enabled.
That should be done when all MultiCharts applications and processes are finished.
After the problem will be reproduced please send me (support@multicharts.com) your logs for analysis.
Please import the attached registry key AllTracesON to ensure that MultiCharts logs are enabled.
That should be done when all MultiCharts applications and processes are finished.
After the problem will be reproduced please send me (support@multicharts.com) your logs for analysis.
- Attachments
-
- AllTraces32bit.zip
- (1.1 KiB) Downloaded 94 times