Hello ACF friends,
I seem to be having difficulties using the IBcontroller. I'm trying to just simply test out the features of the IBcontroller before I test it with my strategy. I'm testing with an IB Paper trading account and when I use the IBcontroller buttons on the main Amibroker toolbar, the IBcontroller window for the status shows only as APIpending. I click transmit and still, nothing happens. I have set the port on both IB controller and the Interactive Brokers Settings page to 7497, Enabled ActiveX and Socket Clients, Unchecked Read-Only API and set trusted IPs to 127.0.0.1. I've also checked all of the Bypass for API orders on the API - Precations page. Any insight into what I might be doing incorrectly? Similarly, do I need to open the 7497 port on my router? Basically, I just want to test the basic functionality of the IBcontroller by using the Buy and Sell buttons that are available on loading IBcontroller (basically manually trading for now as a test and then later coding it in). Any insight and help are much appreciated as yes...I am a newb.
Before creating new duplicate topic, search the forum, answers are already there: https://forum.amibroker.com/search?q=apipending
My apologies Tomasz, I had already performed this search, but none of these provided the solution that resolves this for me. I reviewed them but maybe the best solution at this point is to start coding my Autotrading and see how that affects the status. I was just curious why on its own when pressing the manual buy/sell buttons, it always resolves to APIpending. My IB Controller shows unlocked, so it should be communicating properly with the BrokerIB.exe.
APIPending means that everything on AmiBroker and IBController side is technically CORRECT, meaning that IBController has sent the order to TWS just fine, but for various reasons it cannot be accepted by Interactive Brokers. The status is totally generated on Interactive Brokers side.
You have to ask Interactive Brokers why they give you ApiPending
It can be wrong symbol, it can be wrong size, it can be wrong order type, it can be expired contract, it can be wrong price (not rounded to correct tick size). It can be zillions of reasons ONLY Interactive Brokers can tell you.
Ah ok. Thanks for this @Tomasz. Yeah, I think that's likely where the issue lies....I'll play around a bit more with it when I get a chance.
This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.