OPEN-SOURCE SCRIPT

VWAP Confluence Engine | Anonycryptous

6 833
VWAP Confluence Engine | Anonycryptous
Description & user manual

Why this indicator is different
Most traders run VWAP and RSI as two separate tools. VWAP tells you where price is relative to the volume-weighted average. RSI tells you about momentum. The problem is that these two readings constantly disagree, and when they do, the trader is left guessing which one to trust. Price sits above VWAP while RSI turns down. RSI pushes above its midline while price is still below VWAP. Every one of those moments is a decision made under conflicting information, and that is exactly where most intraday accounts bleed.

The VWAP Confluence Engine removes the guessing. Instead of showing you two panels that argue with each other, it forces agreement before it shows a directional state. Three independent measurements have to point the same way: price relative to VWAP, a volume-weighted RSI, and the Money Flow Index. When all three align bullish, the candle is painted in the bull color. When all three align bearish, it is painted in the bear color. When they disagree, the candle is neutral, and that neutral state is the most important output in the whole system. It is the market telling you it has not decided, and that you should not decide either.

This turns a chart full of conflicting signals into a single color-coded read. One glance tells you direction, momentum, and participation at the same time.

But direction alone is only half of a trade. A signal in the wrong location is a trap, no matter how clean the momentum looks. So the engine also maps support and resistance zones from swing pivots, flips those zones as price reclaims or loses them, and tells you in a dashboard where the nearest level sits above and below. A bull agreement firing directly into a heavy resistance zone is a very different proposition from the same agreement firing off a reclaimed support. The indicator gives you both pieces in one view.

And because a single timeframe is never the whole story, a compact multi-timeframe bar shows the same agreement logic across six timeframes at once. When every timeframe is the same color, the decision is easy. When they are mixed, that is information too.

Important notice
The VWAP Confluence Engine generates visual states based on VWAP position, volume-weighted momentum, money flow, and price structure. These states are not financial advice. They do not predict future price movement. They do not guarantee profitability. All trading decisions are made entirely by the user. Always manage your own risk. Always apply your own judgment.

1. Overview
The VWAP Confluence Engine is an overlay indicator that combines VWAP, a volume-weighted RSI, and the Money Flow Index into a single three-way agreement system, then places that agreement in the context of support and resistance structure and higher timeframe trend.

What it includes:
- Anchored VWAP with selectable reset period (hour, 4 hours, day, week, month)
- Volume-weighted RSI that scales price change by relative volume
- Money Flow Index as an independent confirmation layer
- Three-way agreement candle coloring: bull, bear, and neutral
- Gradient fill between VWAP and price that intensifies with distance
- Support and resistance zones from four independent pivot lengths, with zone flip logic
- Divergence detection with a box drawn on the price chart
- Higher timeframe filter that can gate signals to trade only with the larger trend
- Sentiment transition markers on the exact bar agreement changes
- Two configurable EMAs for optional extra confirmation, independent of the signal engine
- Main dashboard with agreement state, VWAP position, VW RSI, MFI, divergence, nearest levels, and a dedicated higher timeframe section
- Compact multi-timeframe bar across six configurable timeframes
- Optional background coloring
- Alerts for agreement changes and divergence

2. Core logic
2.1 The three-way agreement
Everything in this indicator is built around one question: do all three measurements agree?

The three measurements are:
- VWAP position. Is price above or below the anchored VWAP.
- Volume-weighted RSI. Is momentum above or below its midline.
- Money Flow Index. Is money flow above or below its midline.

A bull state requires price above VWAP, VW RSI above the midline, and MFI above the midline at the same time. A bear state requires all three below. Anything else is neutral.

This is deliberately strict. The indicator does not paint a color unless all three independent readings confirm each other. That is why the neutral state matters so much. It is not a weakness in the signal, it is the signal. It marks the stretches where price is chopping, where momentum and money flow disagree, and where forcing a trade usually ends badly.

2.2 Volume-weighted RSI
Standard RSI treats every bar equally. A move on thin volume and a move on heavy volume produce the same RSI value if the price change is the same. The volume-weighted RSI multiplies each bar's price change by its relative volume, the ratio of that bar's volume to a smoothed average, before the smoothing step. Moves on strong participation push the oscillator harder. Moves on weak participation barely register. The result reflects who was behind the move, not just that a move occurred.

2.3 Money Flow Index
The MFI is calculated from typical price multiplied by volume, producing positive and negative money flow that is converted to a 0 to 100 index. It responds differently from the VW RSI because it weights price level rather than price change. Requiring both to agree means two independent volume-based calculations have to arrive at the same conclusion, which is a stronger condition than either one alone.

3. VWAP and the fill
The VWAP is anchored to a selectable period. Day is the default and the most useful for intraday scalping, resetting at each session open. Week and month give longer-term institutional reference levels. Hour and 4 hours give shorter references for very fast trading.

The fill between VWAP and price is drawn with a gradient. Near VWAP it is almost invisible. The further price travels from VWAP, the more the fill intensifies, up to a configurable maximum. This gives an immediate visual sense of how stretched price is from its volume-weighted average without adding any clutter when price is hugging the line. The fill color follows the agreement state.

4. Support and resistance zones
The engine detects swing highs and lows using four independent pivot lengths, each of which can be toggled and adjusted. Instead of drawing thin lines, it draws zones with a thickness based on the average true range, so each level is a band rather than a single price.

The zones flip color based on where price is relative to them:
- When price is above a zone, it is drawn in the bull color, acting as support.
- When price is below a zone, it is drawn in the bear color, acting as resistance.
- When price is inside a zone, it is drawn in the neutral color, marking active interaction.

This flip logic reflects a basic principle of price structure: old resistance becomes new support once it is reclaimed, and old support becomes new resistance once it is lost. The zone color always tells you which role the level is currently playing.

The maximum number of zones shown per pivot length is configurable, so the chart stays as clean or as detailed as you want.

5. Divergence
Divergence is detected by comparing pivots in the VW RSI against pivots in price.

Bearish divergence: price makes a higher high while VW RSI makes a lower high. Momentum is weakening as price extends.

Bullish divergence: price makes a lower low while VW RSI makes a higher low. Selling pressure is fading even as price continues down.

Sensitivity controls the pivot lookback window. High uses a 3-bar window for more signals and more noise. Medium uses 5 bars. Low uses a 10-bar window for fewer, higher quality signals.

When a divergence confirms, a box is drawn on the price chart spanning the full high-to-low range of the swing involved, with a small label naming the divergence type. This shows not just that a divergence happened, but exactly where on the chart it occurred. The dashboard also reports the current divergence state.

6. Higher timeframe filter
The higher timeframe filter, when enabled, requires the higher timeframe to agree with the current direction before a candle can be painted bull or bear. On a lower timeframe this prevents counter-trend coloring during a pullback inside a larger trend.

The filter can be turned off entirely. With it off, candle coloring is based only on the current timeframe's three-way agreement. This is a deliberate choice left to the trader: strict alignment with the higher timeframe, or faster response on the current one. The dashboard always shows the higher timeframe bias regardless of whether the filter is gating signals, so the context is available either way.

7. Multi-timeframe bar
The multi-timeframe bar is a compact panel showing the agreement direction across six timeframes at once. Each slot is fully configurable, defaulting to 5m, 15m, 1h, 4h, D, and W. Each shows a colored triangle, up for bull, down for bear, a dot for neutral, with the timeframe label colored to match.

This is the fastest read in the indicator. When every timeframe is the same color, alignment is strong and the decision is simple. When the shorter timeframes are one color and the higher ones another, price is at a transition or in conflict, and the bar shows that at a glance.

8. Sentiment transitions
When the agreement state changes, a small marker is plotted on the exact bar where it happened. A triangle up when the state flips to bull, a triangle down when it flips to bear, a dot when it drops into neutral. These mark the moments the read changed, which is often more actionable than the state simply being green or red for many bars in a row.

9. Dashboard reference
The main dashboard updates on every bar and shows:

Agreement - the current three-way state: bull, bear, or hold.
VWAP - whether price is above or below the anchored VWAP.
VW RSI - current volume-weighted RSI value, colored by position.
MFI - current Money Flow Index value.
Divergence - active divergence state, if any.
Near Support - nearest zone level below current price.
Near Resist - nearest zone level above current price.
VWAP Anchor - the current VWAP reset period.

The higher timeframe section, which can be toggled, adds for the selected higher timeframe: its agreement state, VWAP position, VW RSI, MFI, whether the higher timeframe filter is active, and a warning if the current chart timeframe is below the recommended minimum for the system.

10. How to use
10.1 The core read
Wait for agreement. A bull or bear colored candle means all three measurements confirm each other. A neutral candle means they do not. The single most valuable habit this indicator encourages is to simply stand aside when candles are neutral. Those stretches are where the market has not chosen a direction, and where forcing a trade tends to produce the worst outcomes.

10.2 Location matters as much as direction

A colored candle tells you the direction is confirmed. The support and resistance zones tell you whether the location is any good. A bull agreement firing straight into a heavy resistance zone above is a low quality entry, even though the momentum looks clean. The same bull agreement firing off a zone that has just flipped from resistance to support is a far better proposition. Read the two together, never direction alone.

10.3 Using the higher timeframe
If you want to trade only in the direction of the larger trend, enable the higher timeframe filter. Colored candles will then only appear when the current and higher timeframe agree. If you prefer to react faster and judge context yourself, leave it off and use the higher timeframe section of the dashboard and the multi-timeframe bar as reference rather than as a hard gate.

10.4 Divergence as context
A divergence box is a warning that momentum and price have started to disagree, not an instruction to enter. The most reliable approach is to wait for a divergence box near a support or resistance zone and then look for the agreement state to actually flip before acting. Divergence can persist for many bars before price responds.

10.5 Illustrative bull scenario
Educational example only. Not a trading recommendation.
Price pulls back to a support zone that flipped from resistance a few sessions earlier. The multi-timeframe bar shows the higher timeframes already bullish. A bullish divergence box appears at the zone. On the next bar the agreement state flips to bull, painting the candle and plotting a transition triangle. Direction, location, momentum, and higher timeframe are all pointing the same way at the same place.

10.6 Illustrative bear scenario
Educational example only. Not a trading recommendation.
Price rallies into a resistance zone overhead. VW RSI and MFI are both rolling over. A bearish divergence box is drawn across the swing. The agreement state flips to bear and a transition triangle down prints. The higher timeframe section confirms a bearish bias. The setup has direction, structure, and higher timeframe agreement in one location.

11. Recommended use
This system is built for intraday trading and works best on the higher intraday timeframes rather than the very fastest ones, where noise overwhelms the agreement logic. The dashboard includes a timeframe check that flags when you are below the recommended minimum. Pivot settings for the support and resistance zones can be tuned per instrument and timeframe; smaller pivot lengths surface shorter-term levels, larger ones surface major structure.

12. Settings reference
VWAP: anchor period, line color, line width.
VW RSI: length, volume smoothing, midline, overbought and oversold levels, divergence sensitivity, divergence toggle and hold, divergence box toggle and transparency.
MFI: enable, length, midline.
HTF filter: enable, timeframe, RSI midline.
S/R zones: show toggle, four pivot lengths with individual show toggles, max zones per pivot, zone thickness by ATR, zone transparency.
Visuals: bull, bear, and neutral colors, candle coloring toggle, VWAP fill toggle and transparency, background color toggle and transparency, sentiment transition toggle.
Moving averages: two EMAs, each with show toggle, length, color, transparency, and width. The EMAs are an optional visual aid for extra confirmation only. They are not part of the agreement engine and do not influence candle coloring, signals, or any other calculation.
Dashboards: main dashboard show, position, size, HTF section toggle, HTF section timeframe. Multi-timeframe bar show, position, size, and six configurable timeframe slots.

13. Disclaimer
This indicator is provided for educational and informational purposes only. Nothing in this document or in the indicator output constitutes financial advice or any form of recommendation. Trading financial instruments involves substantial risk of loss. Past performance is not indicative of future results. You may lose all of your invested capital. Anonycryptous accepts no responsibility or liability for any losses incurred as a result of using this indicator.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。