User-modified IBController, was: Correct futures symbols for IB Controller

Hello,

I've read the online documentation for constructing TWS synbols when using the IB data plugin, by using the TWS Description pop-up windows associated with the symbol. This also works for futures symbols, eg ESZ8-GLOBEX-FUT. If I want to use IB Controller to send an order to TWS, this symbol doesn't work. TWS gives the error messgae
200. No security definition has been found for the request

What should I use instead? I've searched here for IB Controller futures definition, but haven't found anything.

Many thanks,
Paul

@polomora I do not use the IB controller so this is only something to try....

Add -USD to the ticker as ESZ8-GLOBEX-FUT-USD and see if it works.

@beppe
When I enter the order manually through TWS, the position is displayed in IB Controller as follows:
image
This appears to be the same format as the ticker displayed on AB. Should I just specify "ESZ8", without the
"-GLOBEX-FUT" suffix?

Continued:
I tried this. I passed "ESZ8" as the symbol parameter to the ibc.PlaceOrder() call. Same result, it wasn't accepted.

@polomora did you try to pass: ESZ8-GLOBEX-FUT-USD ?

@beppe
I also tried this, same result.

@polomora I just did a short test with this code (while I do not actually use the IB Controller for my trading I have it and played with it a bit in the past).

ibc = GetTradingInterface("IB");

if( ibc.IsConnected() ) // check if connection to IB was successfull
{
   ibc.PlaceOrder("ESZ8-GLOBEX-FUT", "BUY", 1, "LMT", 2880, 0, "DAY", False ); // place order but do not transmit yet
} 

And DID NOT get any error.
The order was properly transmitted using the IB controller (not submitted).

Make sure you use UPPER case, as IB is case sensitive. See also: How to find correct IB symbol using TWS

@beppe and @Tomasz
I used your sample code as follows, and it still doesn't work. I confirm I'm using upper-case letters

parentId =   ibc.PlaceOrder("ESZ8-GLOBEX-FUT", "BUY", 1, "LMT", 2880, 0, "DAY", False );
stat = "ApiPending";
_TRACE("ApiPending, parentId " + parentId);
while ( stat == "ApiPending" )
{
      ibc.Sleep( 20 );
      stat = ibc.GetPendingInfo(parentId, "Status");
}    
if( ( stat = ibc.GetPendingInfo(parentId, "Status") ) == "Error" )
{
      errMessage = ibc.GetLastError(parentId);
      _TRACE(symbol + ", Cannot place main order " + parentId);
      _TRACE("PlaceLongOrder: Last Error " + errMessage);
      _TRACE("PlaceLongOrder: Cannot handle error - Stop ");
}

And the log shows

ApiPending, parentId 26502
ESZ8-GLOBEX-FUT, Cannot place main order 26502
Last Error 200. No security definition has been found for the request
Cannot handle error - Stop

My TWS account has been enable to accept futures orders, because I can enter the order manually using the TWS user interface.

Further remark:
When I specify a stock symbol, eg IBM, it works.

Are you subscribed to GLOBEX data ? You need to first enter this symbol in AmiBroker and make sure that you are receiving the data. For that you would need to enable GLOBEX on your account subscriptions.

@polomora I looked at the docs and to the sources of the IBController (version 1.3.8.0) and I do not see the GetPendingInfo() function.
Are you using a customized version of the IBController?

2 Likes

@beppe: Indeed I've been using a custom version of IBController.
I've found the error. I had introduced a bug, which translated GLOBEX to SMART, causing the error.
Sorry for wasting your time.
Many thanks again.

1 Like

Please always include crucial information (such as that you modified IBController yourself) in original request. Should we know it from the start (instead of guessing) it would be much easier to point you to the possible source of error.

Yes, you're right @Tomasz.
My apologies again for wasting the board's time.
Paul