priceHigh()/Low() are functions, not series, but there is indeed no reason in the script for the High and Low series. I guess the author just liked series, or he experimented with other indicators where he needed the series.

The script has other bugs, for instance some of the comparisons can never return true. For learning scripting, better start with your own script from scratch.