since the IB-migration to Ireland I cant trade on the paperaccount anymore.
I changed the port from 7496 to 7497 and I also enabled activeX and socket clients in the TWS and have trusted IPs
in TWS and AB at 127.0.0.1
The real account works ( with port 7496), but the paper account does not take any orders.
and the IB controller says:
Error 504. Couldnt connect to TWS. Confirm that "Enable ActiveX and Socket clients" is enabled.
Does anybody have the same problem or know what to do?
@Michael, I made a quick test using the IBController, and it seems to work as expected using the Paper Account (using port 7497 on the same machine).
One question: did you recreated your Paper Account after the migration? I was assigned a new number, and it was empty (no pending orders, positions, etc., with a starting capital of 1M dollars!).
After the migration my old paper-account was gone and I created a complete new one. This has also another username and accountnumber. I tried it on 2 different machines. I just dont know, what I could have made wrong. What else can you do than enable ActiveX in the TWS, set the trustet IP adress in TWS and AB and use the right port?
And the strange thing is, I can login with my new paper-account-username and I get the prices of my instruments, but I also dont get an account-number.
I had a very long call with IB support. They checked everything in my settings and I sent them
screenshots, we reinstalled TWS and so on, but they could not find any mistake in my settings or on my computer.
They told me, it has to have somethung to do with Amibroker.
Tomasz, could you please check, wether there could be anyting i could do in Amibroker?
The IBController is deterministic, simple and open source: https://gitlab.com/amibroker/ibcontroller For connecting to IB, it actually uses the EClientSocket code that IB supplied in their own TWSAPI. So if it works for regular account, there is no reason from IBcontroller side not to work for any other account.
As you noticed your problem started ONLY after moving to IB Ireland and ONLY with paper account and apparently ONLY for you (no-one else is having problems).
Obviously it has nothing to do with IBController. As I said - the error says that TWS port does not exist/does not respond. Usual culprits are: Interactive Brokers TWS or firewall or antivirus.
Interactive Brokers should provide you with their testing application that connects to API.
Reinstalling over and over the same thing does not change anything.
Together with IB staff you should check IF PORTS that you are trying to use are really open and listening.
@Michael in that screenshot, I see that IB controller is connected to port 7496 that is the one used by the real account.
Can you make a test using ONLY the PAPER account and see if the connection is ESTABLISHED to port 7497. DO NOT open AmiBroker at the same time, to the check exclusively the IBController connection to TWS.
Double check also that the IBController is configured to use port 7497.
Beppe, your last post showed me the solution. I only changed the port in database-settings, not in IBController. With that change it works again as it should. My fault. Many thanks for the help.