NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
I've applied this logic
showlastSR = input(title = "Show Only Last Period SR", defval = true)
islastSR = showlastSR ? security(syminfo.tickerid, 'D', barstate.islast, lookahead = true) : true
And implemented "islastSR" it into each plot function as condition, but it seems to still keep previous days levels as well as you can see in shared image
I think this has something to do with what TV is calculating as my local time of the first day of the week rather than what is actual day start of the script, this is why this split,maybe I'm wrong, but any ways to deal with this? Please help ^^
Will change the TF data importing logic and see if it works.