Volume profile

Hello - could the volume profile be configured to show one day only? For example: I want to only see yesterday volume profile on my chart?

Here's an example of what I'm looking for
Thank in advance!

This is something I did awhile ago. You can input the number of days back to have the selected day's POC and VA lines displayed to the right edge.

Capture.jpg
Ruby:
input daysback = 1;

def ymd      = GetYYYYMMDD();
def candles  = !IsNaN(close);
def capture  = candles and ymd != ymd[1];
def dayCount = CompoundValue(1, if capture then dayCount[1] + 1 else dayCount[1], 0);
def thisDay  = (HighestAll(dayCount) - dayCount) ;

def poc      = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no) else poc[1];
def vahigh   = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no).VAHigh else vahigh[1];
def valow    = if thisDay == daysback then reference VolumeProfile("price per row height mode" = "TICKSIZE", "time per profile" = "DAY", "on expansion" = no).VALow else valow[1];

plot poc1    = if thisDay > daysback then Double.NaN else poc;
plot vahigh1 = if thisDay > daysback then Double.NaN else vahigh;
plot valow1  = if thisDay > daysback then Double.NaN else valow;

poc1.SetDefaultColor(Color.CYAN);
vahigh1.SetDefaultColor(Color.YELLOW);
valow1.SetDefaultColor(Color.YELLOW);

input bubblemover = 3;
def b  = bubblemover;
def b1 = b + 1;
input showbubbles = yes;
AddChartBubble(showbubbles and IsNaN(close[b]) and !IsNaN(close[b1]), poc1[b], "POC - " + daysback, Color.CYAN);
AddChartBubble(showbubbles and IsNaN(close[b]) and !IsNaN(close[b1]), vahigh1[b], "VAH - " + daysback, Color.YELLOW);
AddChartBubble(showbubbles and IsNaN(close[b]) and !IsNaN(close[b1]), valow1[b], "VAL - " + daysback, Color.YELLOW, no);
 
This is something I did awhile ago. You can input the number of days back to have the selected day's POC and VA lines displayed to the right edge.
Thank you for this! For some reason the lines do not show when I'm on the one day five minute chart. How could I fix this?
 
Thank you for this! For some reason the lines do not show when I'm on the one day five minute chart. How could I fix this?

TOS requires the data you want to use for this must be in the chart that you are using. Adjust your chart timeframe for your 5m chart to include the necessary number of days for the lookback volume profile to appear.
 
Last edited:
Hello - could the volume profile be configured to show one day only? For example: I want to only see yesterday volume profile on my chart?

Here's an example of what I'm looking for
Thank in advance!
You can also try using the standard VolumeProfile study in TOS and change the "Time per profile" to day. It will show you the days volume profile for the specific day individually. I think that should sole your issue unless I misunderstand what you are looking to do....

/Baba
 
This is something I did awhile ago. You can input the number of days back to have the selected day's POC and VA lines displayed to the right edge.

I really like this POC - is there a way to do add a multi-time frame? For example, looking at the 10 Min chart would like to see 2hr POC. tried using the below information just not good at it.

input agg = AggregationPeriod.FIFTEEN_MIN ;
def close = close(period = agg);
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
503 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