Size:
Color:
Tobey, this should get the job done:
CODE:
Please log in to see this code.
Size:
Color:
Hi Eugene,
The code above is counting consecutive days the stock move on Heavy Volume.
I am looking to count the total number of days a stock was up on heavy volume (greater than 150% of its 50 day volume average) over the last 30 days.
Once I got that figured out I want to reverse it and count the number of days it was down on heavy volume. And then subtract Up from down. The HvyVol.jpg is an example of what it might look like. Red tracks the number of down days on heavy volume in the past 30 days. Green tracks Up days on heavy volume. White is Up Days less down days.
So at the end of the graph you can see in the last 30 days the stock was up 4 day on heavy volume and down 2 days on Heavy volume. So Up days less down days gives us a white line of 2.
I'm hoping this can be used to scan beaten down stock to find where buyers are coming back into the stock.
I hope this makes things clear.
As always thanks for your help!
Tobey
Size:
Color:
Hi Tobey,
Makes sense. Thanks for the clarification. Is this closer to what you're looking for?
CODE:
Please log in to see this code.
Size:
Color:
Hi Eugene,
This is great! I added a variable for the moving average seperate from the lookback period. And put it all in one indicator panel. I think my changes to the code are working.
Thanks so much for the help
Tobey
CODE:
Please log in to see this code.
Size:
Color:
Looks good to me.
Size:
Color:
Hi Eugene,
Now that, with your help, I've got it working I'd like to back test with different stops.
Once again thanks for the help
Tobey
Size:
Color:
Tobey, I am pleased to know that it's working for you.
Size:
Color: