Thanks TJ.
I just copied and pasted the entire code into the powerlanguage editor and received the error in the attached pic.
!. You must ALWAYS copy the header.
The header gives credit to the author for his blood and sweat, and pay homage to his generosity for sharing his code to unknown strangers selflessly and without asking for any rewards, not even a thanks.
Also it is a good practice for you... because it has the link to the original article, which when and if you have access to, can read and understand the process even better.
ps. Comments in the code are for human consumption only; during the compiling process, all comments are ignored by the computer. The compiled indicator will run just as fast and efficient with or without comments.