For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
Get position of an instrument within a strategy
-
How to get current position of an instrument within a strategy? It appears that "strategy.getposition(data)" returns the position of the instrument across all strategies.
-
The broker is a single account broker and there is therefore a single position available.
-
Thanks for reply. Is there a way to assign one broker to each strategy then? Because without ability to correctly evaluate position within each strategy, multi-strategy cannot be truly implemented.
-
No, there is only one broker.