I tried using IBcontroller earlier on in august to pass automatic orders to IB (Interactive brokers) and everything worked fine: orders were created and sent to IB but not executed , which is fine since this is what I wanted.
I am trying again today with exactly the same code but amibroker is not sending anything to IBcontroller (and nothing to IB obviously).
IBController is launched and then nothing happens.
I am using Amibroker 5.6.
This is the code, which is exactly what you have in the readme that comes with the software.
Can you please let me know what is wrong with it? Has something changed in the last 4 weeks?
if( LastValue( Buy ) )
ibc = GetTradingInterface(“IB”);
// check if we are connected OK
if( ibc.IsConnected() )
// check if we do not have already open position on this stock
if( ibc.GetPositionSize( Name() ) == 0 )
// transmit order
ibc.PlaceOrder( “EUR.USD-IDEAPRO-CASH”, “Buy”, 20000, “MKT”, 0, 0, “Day”, False );