The following indicator does not return any values.
I want to build an indicator called “a” where each value is the one from the previous bar to which I add the price variation for the day multiplied (weighted) by the volume variation of the day.
It should work with this modified code, like you did for the ‘a’ variable, giving only once the volume value to the ‘v’ one, fixed it. Because v[1] is not defined the first time the code is read, the calculation can’t complete itself and that’s why you didn’t get anything.
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