POC, VAH, VAL for the current day using Monkey bars

shakib3585

Active member
VIP
Greetings all,

Borrowing from @FutureTony's
https://usethinkscript.com/threads/naked-poc-finder-for-thinkorswim.8215/

I am trying to find the POC, VAH, VAL of a volume profile that is based on an entire trading session (pre, regular, and post) for a current day using monkey bars. I have tried with the attached code but it seems it is changing with changing aggregation. Please help.

Thanks
Code:
def yyyymmdd = GetYYYYMMDD();
def multiplier = 1;
def period = CountTradingDays(Min(First(yyyymmdd), yyyymmdd), yyyymmdd) - 1;
def count = CompoundValue(1, if period != period[1] then (GetValue(count, 1) + period - period[1]) % multiplier else GetValue(count, 1), 0);


def timeInterval = period;
def aggMultiplier = 1;
def agg_count = CompoundValue(1, if timeInterval != timeInterval[1] then (GetValue(agg_count, 1) + timeInterval - timeInterval[1]) % aggMultiplier else GetValue(agg_count, 1), 0);

def agg_cond = CompoundValue(1,  agg_count < agg_count[1] + timeInterval - timeInterval[1], yes);

def digit = CompoundValue(1, if count then 1 else agg_cond + GetValue(digit, 1), 1);

profile monkey = MonkeyBars(digit, "startNewProfile" = count, "onExpansion" = no);

def con = CompoundValue(1, no, no);
def cond = CompoundValue(1, count < count[1] + period - period[1], yes);

profile vol = VolumeProfile(startnewprofile = cond, onExpansion = no);

def pc = if IsNaN(vol.GetPointOfControl()) and con then pc[1] else vol.GetPointOfControl();

plot poc = pc;
.
 
Last edited by a moderator:
Maybe misunderstanding you, but using monkey bars to find volume poc/vah/val doesn't really make sense, these are two different types of profile (time@price VS volume@price)

I can tell you that your POC is shifting over different time aggregations because ToS does not use true tick data to build its volume profiles. They will never be perfectly accurate and will look different depending on how granular the aggregation you're viewing is.

If you want the closest to 'true' values i would recommend using a tick chart (ex: i use 2000 tick for /ES), i have compared these profiles to other software and poc/vah/val values are usually pretty close to what they should be.

Hope this helps
 

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

Maybe misunderstanding you, but using monkey bars to find volume poc/vah/val doesn't really make sense, these are two different types of profile (time@price VS volume@price)

I can tell you that your POC is shifting over different time aggregations because ToS does not use true tick data to build its volume profiles. They will never be perfectly accurate and will look different depending on how granular the aggregation you're viewing is.

If you want the closest to 'true' values i would recommend using a tick chart (ex: i use 2000 tick for /ES), i have compared these profiles to other software and poc/vah/val values are usually pretty close to what they should be.

Hope this helps
Thank you for your reply @Babel. Can you please help with an example script as how to plot a POC using a tick charts
 
A tick chart is just an alternative to a time based chart, it is not a part of any script. where you see your current timeframe you can click once, then click 'timeframe', then select 'Tick' under aggregation type.

I do not use any special script just the standard VolumeProfile script provided by ToS or this custom one which splits overnight/rth into separate profiles https://tos.mx/83fvWWk

I was only trying to explain to you why your POC is changing under different aggregations, this is a limitation of ToS. Hope that makes sense
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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