I think it goes into the else if(Algo == "H24") so it ommits the else if(Algo == "H4"), therefore in the H24 the "upperBandH4" is not initialized.
Maybe to verify, let Zorro return the value of "upperBandH4" instead of the "crossover" statement.