OPEN-SOURCE SCRIPT
NY Anchored VWAP and Auto SMA

NY Anchored VWAP and Auto SMA
This script is a versatile trading indicator for the TradingView platform that combines two powerful components: a New York-anchored Volume-Weighted Average Price (VWAP) and a dynamic Simple Moving Average (SMA). Designed for traders who utilize VWAP for intraday trend analysis, this tool provides a clear visual representation of average price and volatility-adjusted moving averages, generating automated alerts for key crossover signals.
Indicator Components
1. NY Anchored VWAP
The VWAP is a crucial tool that represents the average price of a security adjusted for volume. This version is "anchored" to the start of the New York trading session, resetting at the beginning of each new session. This provides a clean, session-specific anchor point to gauge market sentiment and trend. The VWAP line changes color to reflect its slope:
Green: When the VWAP is trending upwards, indicating a bullish bias.
Red: When the VWAP is trending downwards, indicating a bearish bias.
2. Auto SMA
The Auto SMA is a moving average with a unique twist: its lookback period is not fixed. Instead, it dynamically adjusts based on market volatility. The script measures volatility using the Average True Range (ATR) and a Z-Score calculation.
When volatility is expanding, the SMA's length shortens, making it more sensitive to recent price changes.
When volatility is contracting, the SMA's length lengthens, smoothing out the price action to filter out noise.
This adaptive approach allows the SMA to react appropriately to different market conditions.
Suggested Trading Strategy
This indicator is particularly effective when used on a one-minute chart for identifying high-probability trade entries. The core of the strategy is to trade the crossover between the VWAP and the Auto SMA, with confirmation from a candle close.
The strategy works best when the entry signal aligns with the overall bias of the higher timeframe market structure. For example, if the daily or 4-hour chart is in an uptrend, you would look for bullish signals on the one-minute chart.
Bullish Entry Signal: A potential entry is signaled when the VWAP crosses above the Auto SMA, and is confirmed when the one-minute candle closes above both the VWAP and the SMA. This indicates a potential continuation of the bullish momentum.
Bearish Entry Signal: A potential entry is signaled when the VWAP crosses below the Auto SMA, and is confirmed when the one-minute candle closes below both the VWAP and the SMA. This indicates a potential continuation of the bearish momentum.
The built-in alerts for these crossovers allow you to receive notifications without having to constantly monitor the charts, ensuring you don't miss a potential setup.
This script is a versatile trading indicator for the TradingView platform that combines two powerful components: a New York-anchored Volume-Weighted Average Price (VWAP) and a dynamic Simple Moving Average (SMA). Designed for traders who utilize VWAP for intraday trend analysis, this tool provides a clear visual representation of average price and volatility-adjusted moving averages, generating automated alerts for key crossover signals.
Indicator Components
1. NY Anchored VWAP
The VWAP is a crucial tool that represents the average price of a security adjusted for volume. This version is "anchored" to the start of the New York trading session, resetting at the beginning of each new session. This provides a clean, session-specific anchor point to gauge market sentiment and trend. The VWAP line changes color to reflect its slope:
Green: When the VWAP is trending upwards, indicating a bullish bias.
Red: When the VWAP is trending downwards, indicating a bearish bias.
2. Auto SMA
The Auto SMA is a moving average with a unique twist: its lookback period is not fixed. Instead, it dynamically adjusts based on market volatility. The script measures volatility using the Average True Range (ATR) and a Z-Score calculation.
When volatility is expanding, the SMA's length shortens, making it more sensitive to recent price changes.
When volatility is contracting, the SMA's length lengthens, smoothing out the price action to filter out noise.
This adaptive approach allows the SMA to react appropriately to different market conditions.
Suggested Trading Strategy
This indicator is particularly effective when used on a one-minute chart for identifying high-probability trade entries. The core of the strategy is to trade the crossover between the VWAP and the Auto SMA, with confirmation from a candle close.
The strategy works best when the entry signal aligns with the overall bias of the higher timeframe market structure. For example, if the daily or 4-hour chart is in an uptrend, you would look for bullish signals on the one-minute chart.
Bullish Entry Signal: A potential entry is signaled when the VWAP crosses above the Auto SMA, and is confirmed when the one-minute candle closes above both the VWAP and the SMA. This indicates a potential continuation of the bullish momentum.
Bearish Entry Signal: A potential entry is signaled when the VWAP crosses below the Auto SMA, and is confirmed when the one-minute candle closes below both the VWAP and the SMA. This indicates a potential continuation of the bearish momentum.
The built-in alerts for these crossovers allow you to receive notifications without having to constantly monitor the charts, ensuring you don't miss a potential setup.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。