- ago
Hi!

Is there a way to add the .HK suffix (which I am getting from Metastock for my Hong Kong data) and related information to avoid having to enter all the symbols in IBContracts.txt? It works beautifully for my Norgate .AU data and I would love to have the same simple solution in place for Hong Kong.

Thanks,
Matthias
0
85
4 Replies

Reply

Bookmark

Sort
Glitch8
 ( 12.10% )
- ago
#1
Are you trying to map a symbol from a historical data source (Metastock) to a broker (IB) for trading? If so you should be able to use the symbol mapping feature to do that.
0
- ago
#2
I have been trying to do that and am using a regex to remove leading zeros and the .HK suffix from the symbol to align with IB, however I guess what's missing is the definition of the exchange? I keep getting errors from IB like:

"10/30/2024 13:59:38:915" "Interactive Brokers" "IB request aborted. Could not identify a contract for 669"

I find the symbol 669 in IBKR:


0
- ago
#3
I also found https://www.wealth-lab.com/Discussion/How-can-I-get-correct-HongKong-Market-Historic-data-7548 and am digging through it. Have not yet found a way to resolve my issues, but I will spend some more time on it.
0
Cone8
 ( 6.32% )
- ago
#4
Like in TWS, you need to identify the contract - that's what IBContracts.txt is for. You can name the symbol with any extension you want. For example, the IBContracts.txt record for the one you're showing could be:

CODE:
669.HK=669|HKD|STK|SMART|SEHK

Well yes, that works. (You should make edits to IBContracts.txt after closing WealthLab.)


Or something like this would make it easier to remember the symbol for "Techtronic". The point is, you can use any symbol name, but the contract details need to be in IBContracts.txt for IB to identify what to match the symbol to.
CODE:
TECH.HK=669|HKD|STK|SMART|SEHK
0

Reply

Bookmark

Sort