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:
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue