No luck with a copy and paste so I'll post a picture of the code.
I just noticed that there is another indicator referenced in this code. It's the MMAOsc indicator which I think is the same as the one @Cabbie is talking about in his post. It probably has something to do with the checking to make sure the SP is in a downtrend. Unfortunately the code for this indicator was lost some time ago.
Also note that the line: CLOSERef(VOLUME,-1) should read CLOSE