You need to place your series inside the run function, that's the function that will run on every bar.