I am attempting to find the very first day of the backtest, and then the very last day of the backtest. This will be determined by some type of method. NOT by a date range input setting, because it changes and sometimes there is no session set, the backtest # of bars determines it. It has to find whatever the backtester has selected as the range, identify the beginning and end of that period, and then output report it, as a date.
So it will read: "9/16/21 To 11/10/22"
FirstDayOfBacktest= //How?
LastDayOfBacktest= //How?
BacktestedPeriodDateOutputted = str.format("{1, date, short} + To ", FirstDay) + str.format("{1, date, short}", LastDay)
So, `startDate = This
endDate = This
TotalDays = startDate to endDate
str.tostring("Total Days:") str.tonumber(TotalDays, ...) = 215 Days.
And as a super bonus, how did you get your code block so neat? I can't format, I read the format, it says to put two spaces and to make a new line, I did that. I can't get my code to look as neat as yours. – TheLegendOfA Apr 16 '23 at 21:58