strategy.opentrades.size

Contracts held, positive for a long and negative for a short trade of open trade trade_num (0: the account holds one position per symbol); na when there is none.

strategy.opentrades.size(trade_num: int) -> float

Parameters

Example

held = strategy.opentrades.size(0)