You can Track it with the notifications of notify_order or notify_trade - https://www.backtrader.com/docu/strategy/ Use the TradeAnalyzer which already includes this calculation - https://www.backtrader.com/docu/analyzers-reference/#tradeanalyzer Write a custom analyzer which only tracks that value.