ZenAlgo - LevelsThis script combines multiple anchored Volume-Weighted Average Price (VWAP) calculations into a single tool, providing a continuous record of past VWAP levels and highlighting when price has tested them. Typically, VWAP indicators show only the current VWAP for a single anchor period, requiring you to either keep re-anchoring manually or juggle multiple instances of different VWAP tools for each timeframe. By contrast, this script automatically tracks both the ongoing VWAP and previously completed VWAP values, along with real-time detection of “tests” (when price crosses a particular VWAP level). It’s especially valuable for traders who want to see how price has interacted with VWAP over several sessions, weeks, or months—without switching between separate indicators or manually setting anchors.
Below is a comprehensive explanation of each component, why multiple VWAP lines working together can be more informative than a single line, and how to adjust the script for various markets and trading styles:
Primary VWAP vs. Historical VWAP Lines - Standard VWAP indicators typically focus on the current line only. This script also calculates a primary VWAP, but it “locks in” each completed VWAP value when a new time anchor is detected (e.g., new weekly bar, new monthly bar, new session). As a result, you retain an ongoing history of VWAP lines for every completed anchored period. This is more powerful than manually setting up multiple VWAP tools—one for each desired timeframe—because everything is handled in a single script. You avoid chart clutter and the risk of forgetting to reset your manual VWAP at the correct bar.
Why Combine Multiple Anchored VWAP Lines in One Script? - Viewing several anchored VWAP lines together offers synergy . You see not only the current VWAP but also previous ones from different sessions or months, all within the same chart pane. This synergy becomes apparent if multiple historical VWAP lines cluster near the same price level, indicating a potentially significant zone of volume-based support or resistance. Handling this manually would involve repeatedly setting separate VWAP indicators, each reset at specific points, which is time-consuming and prone to error. In this script, the process is automated: as soon as the anchor changes, a completed VWAP line is stored so you can observe how price eventually reacts to it, repeatedly or not at all.
Automated “Test” Detection - Once a historical VWAP line is set, the script tracks when price crosses it in subsequent bars. If the high and low of a bar span that line, the script marks it in red (both the line and its label). It also keeps a counter of how many times each line has been tested. This method goes beyond a simple visual approach by quantifying the retests. Because all these lines are created and managed in one place, you don’t have to manually label the lines or check them one by one.
Advantages Over Manually Setting Multiple VWAPs
You save screen space: Instead of layering several VWAP indicators, each with unique settings, this single script plots them all on one overlay.
Automation: When a new anchor period begins, the script “closes out” the old VWAP and starts a new one. You never need to remember to reset it manually.
Retest Visualization: The script not only draws each line but also changes color and updates the label automatically if a line gets tested. Doing this by hand would be labor-intensive.
Unified Parameters: All settings (e.g., array size, max distance, test count limit) apply uniformly. You can manage them from one place, instead of configuring multiple separate tools.
Extended Insight with Multiple VWAP Lines
Since VWAP reflects the volume-weighted average price for each chosen period, historical lines can show zones where the market had a fair-value consensus in previous intervals. When the script preserves these lines, you see potential support/resistance areas more distinctly. If, for instance, price continually pivots around an old VWAP line, that may reveal a strong volume-based level. With several older VWAP lines on the chart, you gain an immediate sense of where these volume-derived averages have appeared and how price reacted over time. This wider perspective often proves more revealing than a single “current” VWAP line that does not reflect previous anchor sessions.
Handling of Illiquid Markets and Volume Limitations
VWAP is inherently tied to volume data, so its reliability decreases if volume reporting is missing or if the asset trades with very low liquidity. In such cases, a single large trade might momentarily skew the VWAP, resulting in “false” test signals when the high/low range intersects an abnormal price swing. If you suspect the data is incomplete or the market is unusually thin, it’s wise to confirm the validity of these VWAP lines before using them for any decision-making. Additionally, unusual market conditions—like after-hours trading or sudden high-volatility events—may cause VWAP to shift quickly, setting up multiple lines in a short time.
Key User-Configurable Settings
Hide VWAP on Day timeframe and above : Lets you disable the primary VWAP plot on daily or higher timeframes for a cleaner view.
Anchor Period : Select from Session, Week, Month, Quarter, Year, Decade or Century. Controls how frequently the script resets and preserves the VWAP line.
Offset : Moves the current VWAP line by a specified number of bars if you need a shifted perspective.
Max Array Size : Caps how many past VWAP lines the script will remember. Prevents clutter if you’re charting very long histories.
Max Distance : Defines how far back (in bar index units) a line is kept. If a line’s start bar is older than this threshold, it’s removed, keeping the chart uncluttered.
Max Red Labels : Limits the number of tested (red) VWAP lines that appear. If price tests a large number of old lines, only the newest red labels remain once you hit the set limit.
Workflow Overview
As soon as a new anchor period begins (e.g., a new weekly candle if “Week” is chosen), the script ends the current VWAP and stores that final value in its internal arrays.
It creates a dotted line and label representing the completed VWAP, and keeps track of whether it has been tested or not.
Subsequent bars may then cross that line. If a bar’s high/low includes the line’s value, it’s flagged as tested, labeled red, and a test counter increases.
As new anchored periods come, old lines remain visible—unless they fall outside your maxDistance or you exceed the maximum stored line count.
Real-World Benefits
Combining multiple VWAP lines—ranging, for example, from session-based lines for intraday perspectives to monthly or quarterly lines for broader context—provides a layered view of the volume-based fair price. This can help you quickly spot zones where price repeatedly intersects old VWAPs, potentially highlighting where bulls or bears took action historically. Because this script automates the management of all these lines and flags their retests, it removes a great deal of repetitive manual work that would typically accompany multiple, separate VWAP indicators set to different anchors.
Limitations & Practical Use
As with any volume-related tool, the script depends on reliable volume data. Assets trading on smaller venues or during illiquid periods may produce spurious signals. The script does not signal buy or sell decisions; rather, it helps visually map out where volume-weighted averages from previous periods might still be relevant to market behavior. Always combine the insight from these historical VWAP lines with your existing analytical approach or other technical and fundamental tools you use.
Conclusion
This script unifies past and present VWAP lines into one overlay, automatically detecting new anchor resets, storing the final VWAP values, and indicating whenever old lines are retested by price. It offers synergy through the simultaneous display of multiple historical VWAP lines, making it quicker and easier to detect potential support/resistance zones and better reflect changing market volumes over time. You no longer need to manually create, configure, or reset multiple VWAP indicators. Instead, the script handles all aspects of line creation, retest detection, and clutter management, giving you a robust framework to observe how historical VWAP data aligns with current price action.
By understanding the significance of multiple anchored VWAP lines, you can assess market structure from multiple angles in a single view. As always, ensure you confirm the reliability of the volume data for your particular asset and use these lines in conjunction with other analyses to form a well-rounded perspective on current market behavior.
Vwapstrategy
Multi-Timeframe VWAP Master ProThe Multi-Timeframe VWAP Suite is a comprehensive and highly customizable indicator designed for traders who rely on Volume-Weighted Average Price (VWAP) across multiple timeframes and periods. This tool provides a complete suite of VWAP calculations, including daily, weekly, monthly, quarterly, yearly, and custom VWAPs, allowing traders to analyze price action and volume trends with precision. Whether you're a day trader, swing trader, or long-term investor, this indicator offers unparalleled flexibility and depth for your trading strategy.
Multi-Timeframe VWAPs:
Daily, Weekly, Monthly, Quarterly, and Yearly VWAPs: Track VWAP across various timeframes to identify key support and resistance levels.
Customizable Timeframes: Use the SMA timeframe input to adjust the period for moving averages and other calculations.
Previous Period VWAPs:
Previous Daily, Weekly, Monthly, and Quarterly VWAPs: Analyze historical VWAP levels to understand past price behavior and identify potential reversal zones.
Previous Year Quarterly VWAPs: Compare current price action to VWAP levels from specific quarters of the previous year.
Custom VWAPs:
Custom Start Date and Timeframe: Define your own VWAP periods by specifying a start date and timeframe, allowing for tailored analysis.
Dynamic Custom VWAP Calculation: Automatically calculates VWAP based on your custom inputs, ensuring flexibility for unique trading strategies.
Seasonal and Yearly VWAPs:
April, July, and October VWAPs: Analyze seasonal trends by tracking VWAP levels for specific months.
Yearly VWAP: Get a broader perspective on long-term price trends with the yearly VWAP.
SMA Integration:
SMA Overlay: Combine VWAP analysis with a Simple Moving Average (SMA) for additional confirmation of trends and reversals.
Customizable SMA Length and Timeframe: Adjust the SMA settings to match your trading style and preferences.
User-Friendly Customization:
Toggle Visibility and Labels: Easily enable or disable the display of specific VWAPs and their labels to keep your chart clean and focused.
Color Customization: Each VWAP line and label is color-coded for easy identification and can be customized to suit your preferences.
Dynamic Labeling:
Automatic Labels: Labels are dynamically placed on the last bar, providing clear and concise information about each VWAP level.
Customizable Label Text: Labels include detailed information, such as the timeframe or custom period, for quick reference.
Flexible Timeframe Detection:
Automatic Timeframe Detection: The indicator automatically detects new days, weeks, months, and quarters, ensuring accurate VWAP calculations.
Support for Intraday and Higher Timeframes: Works seamlessly on all chart timeframes, from 1-minute to monthly charts.
Previous Year Quarterly VWAPs:
Q1, Q2, Q3, Q4 VWAPs: Compare current price action to VWAP levels from specific quarters of the previous year.
User-Selectable Year: Choose the year for which you want to calculate previous quarterly VWAPs.
Persistent Monthly VWAPs:
Option to Persist Monthly VWAPs Year-Round: Keep monthly VWAP levels visible even after the month ends for ongoing analysis.
Comprehensive Analysis: Combines multiple VWAP timeframes and periods into a single tool, eliminating the need for multiple indicators.
Customizable and Flexible: Tailor the indicator to your specific trading strategy with customizable timeframes, periods, and settings.
Enhanced Decision-Making: Gain deeper insights into price action and volume trends across different timeframes, helping you make more informed trading decisions.
Clean and Organized Charts: Toggle visibility and labels to keep your chart clutter-free while still accessing all the information you need.
Ideal For:
Day Traders: Use daily and intraday VWAPs to identify intraday support and resistance levels.
Swing Traders: Analyze weekly and monthly VWAPs to spot medium-term trends and reversals.
Long-Term Investors: Leverage quarterly and yearly VWAPs to understand long-term price behavior and key levels.
Seasonal Traders: Track April, July, and October VWAPs to capitalize on seasonal trends.
The Multi-Timeframe VWAP Suite is a powerful and versatile tool for traders of all styles and timeframes. With its comprehensive suite of VWAP calculations, customizable settings, and user-friendly design, it provides everything you need to analyze price action and volume trends with precision and confidence. Whether you're looking to fine-tune your intraday strategy or gain a broader perspective on long-term trends, this indicator has you covered.
VWAP with RSIVWAP with RSI Indicator
Overview
The VWAP with RSI Indicator is a powerful tool that combines the Volume Weighted Average Price (VWAP) with the Relative Strength Index (RSI) to provide traders with comprehensive insights into price trends, volume-weighted price levels, and market momentum. This dual-indicator setup enhances your trading strategy by offering a clearer understanding of the market conditions, potential entry and exit points, and trend reversals.
Key Features
VWAP (Volume Weighted Average Price):
Calculation: The VWAP is calculated using the high, low, and close prices, weighted by trading volume over a specified period.
Purpose: VWAP provides an average price that reflects the trading volume at different price levels, helping traders identify the true average price over a given period.
Visualization: The VWAP line is plotted in blue on the price chart, indicating the volume-weighted average price.
RSI (Relative Strength Index):
Calculation: RSI is based on the average gains and losses over a specified period (default is 14 periods) and ranges from 0 to 100.
Purpose: RSI measures the speed and change of price movements, identifying overbought or oversold conditions in the market.
Overbought/Oversold Levels:
Overbought: RSI above 70 (red line).
Oversold: RSI below 30 (green line).
Midline: RSI at 50 (gray dashed line).
Visualization: The RSI line changes color based on its value (purple for normal, red for overbought, green for oversold) and is plotted below the price chart.
Background Fill for RSI:
Overbought Area: Shaded red when RSI is above 70.
Oversold Area: Shaded green when RSI is below 30.
Bullish and Bearish Divergence Detection:
Bullish Divergence: Occurs when price forms a lower low, but RSI forms a higher low, indicating potential upward reversal.
Visualization: Bullish divergence points are marked with a green line and labeled "Bull."
Bearish Divergence: Occurs when price forms a higher high, but RSI forms a lower high, indicating potential downward reversal.
Visualization: Bearish divergence points are marked with a red line and labeled "Bear."
Alerts: Conditions for bullish and bearish divergences trigger alerts.
Settings
VWAP Settings:
hideonDWM: Option to hide VWAP on daily or higher timeframes.
src: Source for VWAP calculation (default is hlc3 - (high + low + close)/3).
offset: Offset for plotting the VWAP.
RSI Settings:
rsiLengthInput: Period length for RSI calculation (default is 14).
rsiSourceInput: Source for RSI calculation (default is close price).
maTypeInput: Type of moving average applied to RSI (options: SMA, EMA).
maLengthInput: Length of the moving average applied to RSI.
How to Use
Trend Identification: Use VWAP to identify the average price level and market trend. If the price is above VWAP, it suggests an uptrend, and if below, it suggests a downtrend.
Overbought/Oversold Conditions: Use RSI to identify potential reversal points. RSI above 70 indicates overbought conditions, and below 30 indicates oversold conditions.
Divergence: Look for bullish or bearish divergences between price and RSI to anticipate potential trend reversals.
Conclusion
By combining VWAP and RSI, this indicator provides a robust framework for analyzing market conditions, identifying trends, and making more informed trading decisions. Enhance your trading strategy today with the VWAP with RSI Indicator!
VWAP LEVELS [PRO]32 VWAP levels with labels and a table to help you identify quickly where current price is in relation to your favorite VWAP pivot levels. To help reduce cognitive load, 4 colors are used to show you where price is in relation to a VWAP level as well as the strength of that respective level. Ultimately, VWAP can be an invaluable source of support and resistance; in other words you'll often see price bounce off of a level (whether price is increasing or decreasing) once or multiple times and that could be an indication of a price's direction. Another way that you could utilize this indicator is to use it in confluence with other popular signals, such as an EMA crossover. Many traders will wait till a bar's close on the 5m or 10m time frame above a VWAP level (developing 1D VWAP would be a popular choice) before making a decision on a potential trade especially if price is rising above the 1D VWAP *and* there's been a recent 100 EMA cross UP of the 200 EMA. These are 2 bullish signals that you could look for before possibly entering in to a trade.
I've made this indicator extremely customizable:
⚡Each VWAP level has 2 labels: 1 "at level" and 1 "at right", each label and price can be disabled
⚡Each VWAP label has its own input for label padding. The "at right" label padding input allows you to zoom in and out of a chart without the labels moving along their respective axis. However, the "at level" label padding input doesn't work the same way once you move the label out of the "0" input. The label will move slightly when you zoom in and out
⚡Both "current" and "previous" VWAP levels have their own plot style that can be changed from circles, crosses and lines
⚡Significant figures input allows you to round a price up or down
⚡A price line that allows you to identify where price is in relation to a VWAP level
⚡A table that's color coded the same way as the labels. The labels and table cells change to 1 of 4 colors when "OC Check Mode" is enabled. This theory examines if the VWAP from the Open is above or below the VWAP from Close and if price is above or below normal VWAP (HLC3). This way we have 4 states:
Red = Strong Downtrend
Light Red = Weak Downtrend
Light = Weak Uptrend
Green = Strong Uptrend
Something to keep in mind: At the start of a new year, week or month, some levels will converge and they'll eventually diverge slowly or quickly depending on the level and/or time frame. You could add a few labels "at level" to show which levels are converging at the time. Since we're at the beginning of a new year, you'll see current month, 2 month, 3 month etc converge in to one level.
🙏Thanks to (c)MartinWeb for the inspiration behind this indicator.
🙏Thanks to (c)SimpleCryptoLife for the libraries and code to help create the labels.