OPEN-SOURCE SCRIPT
Futures Volume VWAP + Bands - CFD Charts

A session/week/month-anchored VWAP with 1/2/3-sigma bands — with a twist for
CFD traders: the VWAP weighting can use REAL futures exchange volume instead
of broker tick volume.
What makes it original: this is not another VWAP variant — the weighting
source is the auto-detected futures contract while the price stays the CFD's,
bars without futures data are excluded instead of silently falling back to
tick volume, and the daily anchor can follow the futures trading day so the
VWAP matches across CFD and native futures charts.
How it works:
- Price source is this chart's CFD price (hlc3 by default); the weight is the
volume of the auto-detected futures contract (request.security). Because
only the WEIGHT comes from the future, the basis offset between CFD and
futures prices is handled naturally.
- Bands are computed from the volume-weighted variance around the VWAP.
- Optional "Daily anchor = futures trading day" resets the calculation at the
futures day change instead of CFD broker midnight, so the VWAP matches
across CFD and native futures charts.
- Bars without futures data do not enter the sums; a status label always
shows which volume source is active.
How to use it: the standard VWAP playbook applies — price above a rising VWAP
supports longs, reversion trades target the VWAP, and the 2/3-sigma bands mark
statistically stretched zones where momentum entries have poor expectancy. The
difference is that these levels are weighted by real market participation, so
they match what futures traders see instead of broker tick noise. Check the
status label once after loading to confirm the futures feed is active.
CFD traders: the VWAP weighting can use REAL futures exchange volume instead
of broker tick volume.
What makes it original: this is not another VWAP variant — the weighting
source is the auto-detected futures contract while the price stays the CFD's,
bars without futures data are excluded instead of silently falling back to
tick volume, and the daily anchor can follow the futures trading day so the
VWAP matches across CFD and native futures charts.
How it works:
- Price source is this chart's CFD price (hlc3 by default); the weight is the
volume of the auto-detected futures contract (request.security). Because
only the WEIGHT comes from the future, the basis offset between CFD and
futures prices is handled naturally.
- Bands are computed from the volume-weighted variance around the VWAP.
- Optional "Daily anchor = futures trading day" resets the calculation at the
futures day change instead of CFD broker midnight, so the VWAP matches
across CFD and native futures charts.
- Bars without futures data do not enter the sums; a status label always
shows which volume source is active.
How to use it: the standard VWAP playbook applies — price above a rising VWAP
supports longs, reversion trades target the VWAP, and the 2/3-sigma bands mark
statistically stretched zones where momentum entries have poor expectancy. The
difference is that these levels are weighted by real market participation, so
they match what futures traders see instead of broker tick noise. Check the
status label once after loading to confirm the futures feed is active.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。