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
trade_numint: Which closed trade: 0 is the oldest, strategy.closedtrades - 1 the newest; another number gives na.
Example
lastExitBar = strategy.closedtrades.exit_bar_index(strategy.closedtrades - 1)