Converting a chart study into a scan is pretty much the same process for nearly every chart study. The process consists of three steps:
- Change all "plot" statements to "def"
- Remove all the style statements for each of those "plot" you just changed to "def"
- Add the final line of code such as "plot scan = <<true/false>> ;" After the equal sign will be your true/false statement that generates the scan results
This has been described many times thorough this forum. (and more than a few of my free tutorial videos). The process can get a bit more complicated for the licensed studies and there are even some studies that can never be converted into a scan.
For your specific piece of code the final statement that gets added in step 3 is as follows:
plot scan = VScore[1] < 0 and VScore > 0;
I have attached a version of your code that has been converted to a scan as a plain text file attached below this answer. In that file you will find I also removed every line that was not required to run the scan.