For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Can support long and short position simultaneously?
-
Hi, backtraders. In Chinese futures market, for the same contract, you can hold long and short positions simultaneously. and we have four commands to submit an order: open_long, close_long, open_short, close_short.
I wonder if it's possible to customize bt to support Chinese future market?
-
@li-mike I don't think BT supports "boxed" positions (simultaneous long and short in the same security) but I would think you could fake it by adding the same feed for the security twice and just treating one of them as the long and the other as the short.