Thanks a lot @SleepyZThe following code allows you to choose a range or the chart timeframe for the anchor to the high/low.
For a 6 month period on a daily chart, including today, then choose method as chart and chart timeframe setting as 6 months from the dropdown
For a user defined range, choose method as range and input the period_begin and period_end
Image is period from 0701/2024 through 12/31/2024
Code for above