Direct answer
ta.vwap(hlc3) means you are feeding the VWAP calculation with the typical price instead of close. That small choice changes how the line reacts and is one reason your custom VWAP may not match another indicator exactly.
Most traders searching this are not really asking what VWAP stands for. They are asking why their line looks slightly different from the built-in one or why the session behavior does not match what they assumed.
Where people usually get this wrong
The trouble usually starts when VWAP is treated like a generic moving average instead of a session-aware anchored measure.
- changing the source input but expecting an identical line
- forgetting that session boundaries matter to VWAP behavior
- comparing a custom VWAP to a differently anchored built-in tool
- adding too many filters before checking the raw line first
Copyable example
This is the kind of base pattern I prefer to start from before adding more filters, styling, or automation layers.
//@version=6
indicator("VWAP hlc3 check", overlay = true)
price = hlc3
sessionVwap = ta.vwap(price)
sessionEma = ta.ema(close, 20)
plot(sessionVwap, "VWAP hlc3", color.new(color.aqua, 0), 2)
plot(sessionEma, "EMA 20", color.new(color.orange, 0), 1)
How I would handle it in a real build
I check three things first: the source input, the session or anchor assumption, and whether the comparison benchmark is actually the same kind of VWAP. That usually explains the mismatch faster than rewriting the entire script.
If your current script or workflow already exists and the behavior is drifting, send the setup or code on WhatsApp. I can usually tell quickly whether it needs a rewrite, a migration pass, or a smaller audit.
WhatsApp for a 3-minute quoteWhat to read next
If this topic is part of a bigger TradingView or Pine Script workflow for you, these are the most useful follow-up guides on the site.
Send the chart idea, broker, market, and goal on WhatsApp. I can usually tell you quickly whether it needs a custom indicator, a strategy audit, an alert fix, or a broker-ready automation layer.
Related services
Frequently asked questions
Should I optimize this for backtests first or live behavior first?
Live behavior comes first. A cleaner live model usually gives you a more believable backtest, while the reverse is not always true.
Is Pine Script v6 the safer default for new examples now?
Yes. Traders still search with older wording, but new examples are usually easier to maintain and explain in v6.
When is the next step a service page instead of another tutorial?
Once you know the logic you want and the remaining problem is implementation, audit, or broker-ready structure, the service path is usually the better next move.
Primary sources and references
I take on Pine Script indicators, TradingView automation layers, strategy audits, and broker-aware execution workflows when the goal is clear and the live behavior actually matters.