It will work on time frames less than than or equal to 1st input. Hope this code helps you all.
IMPORTANT SETTING DETAILS:
1.Res = input(title="Starting X minutes lines to be Displayed",defval="15", type=input.resolution)
2.Day_start_15m=input("0915-0930",title="your country's Trading session time (starting X minutes)")
make sure to enter the starting 15 min of your country trading time in the input in 2nd input
both the above input 1 and 2 must be equal in time i.e "0915-0930"=15min and first one is also 15m
you need to make sure that the input settings are correct. It is By default set For INDIAs trading start time, you have to set start time according to your country.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.