Good afternoon guys, I’m trying to build a ratio of up vs down volume over the last 50 trading days. So I’m looking to calculate the ratio of volume on days when the stock closed higher on the day vs the volume on days when the stock closed lower. I’ve attempted to create the code but I don’t think I’ve done it correctly. Can someone take a look please? Any help much appreciated
Add these two lines at the very beginning, as a variable which hasn’t been modified will retain the previous value so that it always happens that both variables have some value, be it the current one or a prior one:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok