I am connected to I TWS for datafeed through built in IB dataplugin. I use Port No. 7496, Trusted IP 127.0.0.1. Screenshot of API setting placed below. The charts are updating. If I set autotrade "ON", I am getting "Error 326 Unable to connect as client id is already in use. Retry with unique client id." Please suggest remedy.
IBcontroller has separate port setting.
@codejunkie, I have set the same port settings
Close and restart IBcontroller. Maybe you have started IBcontroller before TWS start up.
You may find error codes here
https://interactivebrokers.github.io/tws-api/message_codes.html
326 - Unable to connect as the client id is already in use. Retry with a unique client id.
Another client application is already connected with the specified client id.
restarted Amibroker as well as IB Controller, with TWS on. No joy. No other connection established.....does that happen with Demo account?
You have some OTHER application that connects to TWS and uses Client ID of ZERO.
Close OTHER programs.
Ensured no other applications were running and checked again.
This error did not occur with esignal data feed and activating IB connection (on initiating trading interface...AutoTrading ON from parameters window).
The error generated with IB data feed.
@codejunkie already told you what the code means. We did not invent this code. This is IB error code. Not AmiBroker's. Interactive Brokers TWS says to you "Another client application is already connected with the specified client id." Which means exactly what it says: you have TWO apps connecting with client ID = 0.
You may be simply unaware that something else is connecting automatically (Windows "Start Up" folder !)