strategy.closedtrades.exit_bar_index

Bar index of the exit fill of closed trade trade_num (0 = the oldest); na when there is no such trade.

strategy.closedtrades.exit_bar_index(trade_num: int) -> int

Parameters

Example

lastExitBar = strategy.closedtrades.exit_bar_index(strategy.closedtrades - 1)