// Date Range Filter startDate = input.time(timestamp("2018-01-01 00:00"), title="Start Date") endDate = input.time(timestamp("2069-12-31 23:59"), title="End Date") inDateRange = (time >= startDate and time <= endDate) if not inDateRange strategy.close_all()