Get number of days from intraday data in Custom backtester


I am trying to build custommetric that requires number of days used in the backtest. I am running the code on different intraday timeframes and sessions. Thus I cannot use BarCount.

Can you please hint me how to get first bar date and last bar date of backtested period in custom backtester?

Thank you.

Do you mean a function like this ?

"rangefromdate", "rangetodate" - return current auto-analysis From-To range as DateNums

It should solve your problem :slight_smile: