strategy.closedtrades.entry_bar_index
Bar index of the entry fill of closed trade trade_num (0 = the oldest); na when there is no such trade.
strategy.closedtrades.entry_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
firstBar = strategy.closedtrades.entry_bar_index(0)