I moved the post out of the "Watchlist" topic and into the "Stock Scanners" topic. I also updated the title of your question to include the name of the chart study you are referencing in this request.
The code for this chart study is not a candidate for converting to a scan. The code makes use of functions that use the entire chart data in order to generate it's levels and signals. The scan engine on Thinkorswim is not able to replicate the span of time you can select on the chart. Therefore, any scan you might try to construct from this chart study will never match what you see on the chart.
In general I would recommend you throw this chart study in the trash bin. You will find that the levels it computes will change based on how much data you have loaded on the chart. For example levels will change if you load 2 years, 1 year, 9 months or 6 months of data on the chart. Since those levels will change based on the span of time you have loaded on the chart, this means all of the signals will be likely to change as well.
Pure garbage. Sorry, don't shoot the messenger.