Within the WoodiesPivots study included with Thinkorswim there is a user input named "time frame". Among the list of available "time frames" is one for "OPT EXP". This causes the pivot levels to be computed based on the expiration dates of the standard monthly options for all stocks. There is no equivalent time frame available for custom scans. Which you have already observed.
There is no way simple way to work around this limitation. There may be a very complex way to solve this. The only way to go about this would be to revise the code from the WoodiesPivots study to compute the levels from a daily time frame. This would require the use of some very complex code to compute expiration Friday. Then the code would need to use several recursive variables to keep track of the key values from each options expiration period and compute the values of each level from those recursive variables.
Not even sure if this is possible, but I have laid out the core challenges that must be conquered in order for this to even have a chance at working.
All of this is light-years beyond the scope of what I can accomplish in the brief 15 min I allow for providing free solutions in the Q&A Forum.