OPEN-SOURCE SCRIPT

VWAP Delayed

已更新
Display VWAP and VWAP standard deviation plots only during the specified time period. Useful if you want to avoid seeing all of the lines bunched up at the beginning of the day. Note that VWAP is calculated for the full day just not displayed until the specified time period. Optionally, you can include/exclude pre-market data in the VWAP calculation for the day.
版本注释
Added option to always show the main VWAP line.
版本注释
Added ability to select data source. Defaulting now to hlc3 to better match the default of the built-in indicators.
版本注释
v2
Added alerts and additional settings.

Source: Data source for the VWAP calculation.

Override Time Zone: By default, the time based input values, “VWAP Visible Between” and “Alert Between”, use the time zone of the market the currently loaded chart symbol trades in. For instance, NVDA trades on the NASDAQ so it would use the Eastern time zone, ES trades on the CBOE so it would use the Central time zone. If your chart settings are set to use the Eastern time zone, the ES chart will start displaying 1 hour after the “VWAP Visible Between” setting. Use this input to designate a single time zone regardless of where the current symbol trades. There isn’t a way to programmatically detect the time zone set in chart settings so this needs to be set here manually. Do a web search to get the correct IANA time zone name for your time zone.

VWAP Visible Between: Display the VWAP plots during this time period.

Include Premarket: When set to true, VWAP calculations begin on the first bar of the day. When set to false, calculations start on the first bar after the market opens for regular trading.

Show Standard Deviation Value: Displays a table showing the current standard deviation value. The location can be changed in the dropdown. The value is also displayed on the status line for the indicator as the last value in gray.

Show VWAP: Use this to show/hide VWAP. Check the “Always” box to show the VWAP plot even if we’re outside the “VWAP Visible Between” hours.

Std. Dev Multiplier 1/2/3: The standard deviation multipliers of the VWAP plots.

Reset 1/2: Use this to override when VWAP calculations start. Useful for securities like futures that trade outside normal stock market hours.

Alert Between: The hours when alerts are triggered. Make sure you understand how TradingView alerts work before using alerts for this indicator. The important points are that you need to manually create the alert and that the alert is a snapshot of the version and settings of the indicator at the time the alert was created. This means that if you change an indicator setting after an alert is created, the alert will still be using the old value for that setting. You need to update or recreate the alert to reflect setting changes.

Alert Level Checkboxes (+3 SD, +2 SD, …) : Select which levels you want to alert on. Alerts are triggered when the high OR low series of a candle crosses the level. Note that it’s the series that matters so if an alert is triggered for +2 SD for instance and the next candle’s high is also above the +2 SD, you won’t get an alert on the second candle. Make sure you’re comfortable with this behavior before using it. Turn on “Show Alerts on Chart” and review previous days to see where alerts would have triggered.

Show Alerts on Chart: Display a marker when a level is crossed. Only displays markers for the levels selected for alerts above.

Realtime Alerts: Alerts as soon as the SD levels are crossed. This can create false alarms if the candle’s values cause the VWAP plots to change when the candle closes. For instance, if the current candle crosses the -2 SD level 2 minutes into a 5 minute candle, an alert is triggered if this setting is true. If the price then spikes up in the 4th minute of the candle, changing where the -2 SD plot is located, it may appear at the close of the candle that the crossing of the SD level didn’t occur. Make sure you’re comfortable with this behavior before using it.
Volume Weighted Average Price (VWAP)

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明