Cannot Modify Global Variable In Function Pine Script