Up down volume counter request

Techfan1128

New member
I’ve done this manually but it can get pretty tiresome if you are doing it on more than one instrument. I am looking for an indicator that counts the volume in bars that close green as positive and that close red as negative.

Example -

1. The indicator needs editable session start and end time. Default would be 1700 (central time) start time and 1515 (central time) end time. But this could be changed to just the day session (830 to 1515 or whatever session you want).
2. If a bar closes green by even 1 tick it is an up bar and the volume is counted as plus volume in the histogram.
3. If a bar closes red by even 1 tick it is a down bar and volume is counted as a minus.
4. If open and close of bar is exactly the same volume is halved. Half to the positive, half to the negative
5. On the histogram there needs to be a zero line. When total accumulated volume in that session is positive the bars will be above zero line and green. When total accumulated volume in the session is negative the bars will be below zero line and red.

That’s it! We could add something creative like 2 moving averages of the volume (that are editable), so we could view what happens when they cross over. So it would really look a lot like an MACD indicator but based on cumulative volume.

If you have any questions let me know!
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Is this what you are asking for?
If so, I can post code in a new Study.

Note, in the below, I set the rollover time to 10:15am PT, and made the rollover work on a 30min chart that does not have a bar exactly at 10:15.

xTtCu2C.png
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
531 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top