- ago
Hello,

I recently began using live positions while live trading. Unfortunately there has been a side effect for one of the contracts I am trading. The GF (Feeder Cattle) contract is priced in cents instead of dollars by the exchange but not by IB. The data provided has the decimal place moved two places to the right. However, since I turned on live positions, the position is reported as the number with the decimal moved to the left. This incompatibility and inconsistency is now causing an issue since IB quotes prices as "200" but the position is reported as "2.00".

This will be more clear in the screenshots below. Basically I had an incorrect fill because instead of entering the limit order at 259.13, it was entered at 9.55.

I am not sure how to work around this problem. One idea I had was for WL to allow you to use different settings for different strategies. This strategy does not need to use live positions to function correctly, but others do. If I could use the live positions for other strategies but not this one, it would fix my problem and also allow other useful permutations of settings for everyone.



0
206
8 Replies

Reply

Bookmark

Sort
- ago
#1
I'm not the expert here, just wonder if the different contract names highlighted on your screenshot is OK (GF#C and GFH24) ?
0
- ago
#2
Yes I get the same result when I change the backtest to GFH24. The GF#C is the continuous contract which is currently GFH24.
0
Cone8
 ( 23.52% )
- ago
#3
I'll look into this crazy dollar/cents contract pricing, but DO NOT use the continuous contract for trading. From the Help...

Continuous Contracts
You can request data for the continuous contract by adding a #C suffix to the contract symbol. Continuous contracts return historical data only and cannot be traded without mapping to a specific 2-digit year contract symbol.

But I'd argue that mapping is just a bad idea in this case because it's behind the scenes and you have to set it up every month anyway. Use the contract Month/Year that you want to trade.
0
Cone8
 ( 23.52% )
- ago
#4
I see how to make this work. There's a "PriceMagnifier" field in the contract details. We'll use that to multiply the price returned for the Account Position so that it matches the cents pricing in the charts.

I'll have this ready to go in IB Provider 44.. probably later this week.
1
- ago
#5
You might want to take a look at micro bitcoin futures contracts as well. I am having a hard time replicating it, but it is behaving a little strangely, perhaps it is an after hours problem as well. It just submitted an order at "0" for a profit taker. Sorry I didn't take a screenshot, next time I see it, I will document it. I do believe it is related to the live position setting as well.
0
Cone8
 ( 23.52% )
- ago
#6
I know nothing about that contract.
Give me your IBContracts.txt record for it.
0
- ago
#7
Here is what I found in the IBContracts.txt file for the Microbitcoin futures:

MBTF24=MBT|USD|FUT|CME||MBTF4|202401||0|0.1
MBTG23=MBT|USD|FUT|CME||MBTG3|202302||0|0.1
MBTG24=MBT|USD|FUT|CME||MBTG4|202402||0|0.1
MBTH24=MBT|USD|FUT|CME||MBTH4|202403||0|0.1
MBTX23=MBT|USD|FUT|CME||MBTX3|202311||0|0.1
MBTZ23=MBT|USD|FUT|CME||MBTZ3|202312||0|0.1
MBTZ24=MBT|USD|FUT|CME||MBTZ4|202412||0|0.1
0
Cone8
 ( 23.52% )
- ago
#8
It looks to me like everything is set up correctly and the BarHistory has the correct information for SymbolInfo (Tick Size, Point Value, etc.). I guess we need to know more about what and what data generated your order.
0

Reply

Bookmark

Sort