I want my system to use Norgate as the end-of-day data provider and send orders to IB, but Norgate’s symbology is not the same as IB’s. For example Norgate uses AAPL, whereas IB uses AAPL-SMART-STK-USD.
So when I select the Norgate database as the market data source and my symbols list contains the Norgate symbols, how do I translate this to IB symbology? When sending orders using the IB controller, the symbol has to be in the format required by IB.
Do I need to write code for that, ie something like below?
Did you read the documentation http://www.amibroker.com/guide/h_ib.html ? I guess not.
If you did you would know that you don’t need to add -SMART-STK-USD because these are DEFAULT values that are used if they are NOT specified at all, so AAPL just works.
I am speaking about BOTH. IBController uses same defaults as data plugin. So the link applies to IBController too.
For symbols that don’t use defaults, like futures, you can use Alias field. It is designed for that purpose.
Really Google is your friend. Google “Alias +site:amibroker.com” and you will find everything.
Do the same, i.e use GOOGLE with +site:amibroker.com and you will see the answer to ALL your future questions immediately.
Attached is an example of how I defined the alias for the Copper futures.
However, when a signal is generated and IB controller places an order, I still see that HG2_CCB is used as the symbol instead of the IB symbol, as shown in the below API log file snippet generated by TWS:
21:21:05:676 <- 3-25-16-HG2__CCB-STK--0---SMART--USD--Sell-17-STP-0-312.4-GTC--DU638802-O-0--0-15-0-0-0-0-0-0--0-------0--0---0---0-0--0------0-----0--------0-
21:21:05:677 -> 3-6-15-ApiPending-0-17--0-0--0--3-6-16-ApiPending-0-17--0-15--0--
21:21:06:044 -> 4-2-15-200-No security definition has been found for the request-
As a result, the request is rejected with the "No security definition has been found for the request" error.
Could anybody tell me what I am doing wrong?