Getting the 50 day average volume is pretty simple. However, I'm having a bit of a struggle figuring out how to get the average volume that's above the 50 day average volume.
My original thought was to sum up the volume bars that were above the 50 day average. Something like:
big_vol = if volume > avg_vol then volume + big_vol;
Since I can't use the variable within the definition of the variable, that won't work. I'm thinking in terms of a regular programming language and having a hard time doing what I want within the limits of a scripting language. Can anyone lend a hand?
My original thought was to sum up the volume bars that were above the 50 day average. Something like:
big_vol = if volume > avg_vol then volume + big_vol;
Since I can't use the variable within the definition of the variable, that won't work. I'm thinking in terms of a regular programming language and having a hard time doing what I want within the limits of a scripting language. Can anyone lend a hand?