PulseHub
OPEN-SOURCE SCRIPT

Premium VWAP Bands Long Short

151
# Premium Session VWAP Bands — Long / Short Trend

## Overview

Premium Session VWAP Bands is a minimalist trend-direction indicator designed to provide an immediate visual reading of the current intraday market bias.

The indicator uses only:

* Session VWAP
* VWAP slope
* Price position relative to VWAP
* Standard-deviation bands

It does not use RSI, MACD, moving averages, ATR, ADX, SuperTrend, order flow, volume profile, fair value gaps, or Smart Money Concepts.

The main objective is simplicity. A trader should be able to look at the chart and identify one of three market states:

* LONG
* SHORT
* NEUTRAL

The current state is communicated through a subtle chart background and a compact information panel in the upper-right corner.

This is an indicator, not a strategy. It does not place orders, calculate position size, provide automatic entries, or generate backtest results.

---

## Core VWAP Calculation

The central gold line represents the session VWAP.

VWAP stands for Volume Weighted Average Price. It measures the average traded price while assigning greater weight to prices where more volume occurred.

The VWAP calculation resets at the beginning of each new trading day. This makes the indicator primarily suitable for intraday analysis.

The session VWAP acts as the main directional reference:

* Price above VWAP indicates that the market is trading above the session’s volume-weighted average.
* Price below VWAP indicates that the market is trading below the session’s volume-weighted average.
* Price moving repeatedly around VWAP usually indicates balance, consolidation, or an unclear directional advantage.

The VWAP line is intentionally more prominent than the bands and uses a matte-gold color by default.

---

## VWAP Bands

The indicator displays one upper band and one lower band around VWAP.

The bands are calculated using standard deviation and are designed to show how far price has moved away from the session VWAP.

The default Band Multiplier is:

1.0

A lower multiplier creates narrower bands and makes them more sensitive to smaller price movements.

A higher multiplier creates wider bands and highlights more significant price extensions.

The bands should not automatically be interpreted as buy or sell signals.

For example:

* A touch of the Upper Band does not automatically mean that price should reverse downward.
* A touch of the Lower Band does not automatically mean that price should reverse upward.

During a strong trend, price may remain near or outside one band for an extended period.

The bands are best used to evaluate:

* Price extension from VWAP
* Pullbacks toward the session average
* Trend continuation conditions
* Potential mean-reversion areas
* The current structure of intraday volatility

---

# Background Trend Logic

The background is the primary directional feature of the indicator.

It uses three possible states:

* Green background: LONG
* Red background: SHORT
* No background: NEUTRAL

The background is intentionally highly transparent so that candles, drawings, levels, and price action remain clearly visible.

The default transparency is 91%.

---

## Green Background — LONG Trend

The chart background becomes dark green only when all required LONG conditions are confirmed.

A LONG state requires:

1. The current price to close above VWAP.
2. VWAP to be higher than it was on the previous bar.
3. The calculated VWAP slope to be positive.
4. Price to remain clearly above the internal neutral zone around VWAP.
5. The bar to be closed and confirmed.

In simplified terms:

Price is above a rising VWAP.

The green background indicates a bullish intraday environment in which long setups may be given priority over short setups.

It does not mean that a trader should immediately enter a long position when the background turns green.

A more conservative approach is to wait for:

* A pullback toward VWAP
* A successful rejection of VWAP
* A higher low
* A bullish candle confirmation
* A breakout followed by continuation
* Confluence with the trader’s existing market structure analysis

The green background should therefore be treated as a directional filter rather than an automatic entry signal.

### Example LONG interpretation

When the background is green:

* Long setups are aligned with the current VWAP direction.
* Countertrend short positions carry additional risk.
* Pullbacks toward VWAP may provide more favorable locations than buying after an extended move.
* Price remaining above a rising VWAP supports the continuation of the bullish state.

The LONG state remains active only while the required conditions continue to be satisfied.

---

## Red Background — SHORT Trend

The chart background becomes dark red only when all required SHORT conditions are confirmed.

A SHORT state requires:

1. The current price to close below VWAP.
2. VWAP to be lower than it was on the previous bar.
3. The calculated VWAP slope to be negative.
4. Price to remain clearly below the internal neutral zone around VWAP.
5. The bar to be closed and confirmed.

In simplified terms:

Price is below a falling VWAP.

The red background indicates a bearish intraday environment in which short setups may be given priority over long setups.

It does not mean that a trader should immediately enter a short position when the background turns red.

A more conservative approach is to wait for:

* A pullback toward VWAP
* A rejection below VWAP
* A lower high
* A bearish candle confirmation
* A breakdown followed by continuation
* Confluence with the trader’s existing market structure analysis

The red background should be treated as a directional filter rather than an automatic entry signal.

### Example SHORT interpretation

When the background is red:

* Short setups are aligned with the current VWAP direction.
* Countertrend long positions carry additional risk.
* Pullbacks toward VWAP may provide better locations than selling after an extended decline.
* Price remaining below a falling VWAP supports the continuation of the bearish state.

The SHORT state remains active only while the required conditions continue to be satisfied.

---

## No Background — NEUTRAL Trend

When neither the LONG nor SHORT conditions are fully satisfied, the indicator changes to the NEUTRAL state.

The background is then completely removed.

A NEUTRAL state may occur when:

* VWAP is flat or nearly flat.
* Price is too close to VWAP.
* Price is above VWAP while VWAP is falling.
* Price is below VWAP while VWAP is rising.
* Price repeatedly crosses VWAP.
* The market is consolidating.
* Directional conditions are conflicting.
* The session has just started and insufficient VWAP information is available.

The indicator uses a small internal neutral zone around VWAP. This zone is equal to 5% of the current distance between VWAP and the Upper Band.

Its purpose is to prevent very small movements directly around VWAP from being immediately classified as LONG or SHORT.

When price remains inside this area, the state stays NEUTRAL even if price is marginally above or below VWAP.

This helps reduce rapid background switching when the market is balanced around its session average.

A NEUTRAL state should not automatically be interpreted as a reversal signal. It means only that the indicator does not currently detect a sufficiently clear directional alignment.

---

# Trend Information Panel

A compact panel appears in the upper-right corner of the chart.

It displays one of three values:

* Trend: LONG
* Trend: SHORT
* Trend: NEUTRAL

The panel uses:

* Green text for LONG
* Red text for SHORT
* Gray text for NEUTRAL

The panel is intended to provide a clear trend reading without adding unnecessary statistics or visual clutter.

It can be disabled in the indicator settings.

---

# Alert Conditions

The indicator includes three alert conditions:

## LONG Trend Activated

Triggered when the confirmed trend state changes from SHORT or NEUTRAL to LONG.

The alert is generated only when a closed bar confirms that:

* Price is above VWAP
* VWAP is rising
* Price is outside the neutral zone

## SHORT Trend Activated

Triggered when the confirmed trend state changes from LONG or NEUTRAL to SHORT.

The alert is generated only when a closed bar confirms that:

* Price is below VWAP
* VWAP is falling
* Price is outside the neutral zone

## Neutral Trend

Triggered when the confirmed trend state changes from LONG or SHORT to NEUTRAL.

This may indicate that:

* Trend momentum has weakened
* Price has returned toward VWAP
* VWAP has flattened
* Price and VWAP direction are no longer aligned

Alerts trigger only when the state changes. They do not repeat on every bar while the same state remains active.

For the most consistent behavior, alerts should be configured using:

Once Per Bar Close

---

# Suggested Use on the 2-Minute Timeframe

The indicator was designed primarily for the 2-minute timeframe, especially for intraday markets such as index futures.

On a 2-minute chart, the indicator can be used as a directional filter:

## During a LONG state

Traders may focus on:

* Pullbacks toward VWAP
* Bullish reactions above VWAP
* Higher-low formations
* Continuation after consolidation
* Long setups that agree with the session direction

## During a SHORT state

Traders may focus on:

* Pullbacks toward VWAP
* Bearish reactions below VWAP
* Lower-high formations
* Continuation after consolidation
* Short setups that agree with the session direction

## During a NEUTRAL state

Traders may consider:

* Waiting for clearer directional alignment
* Reducing trade frequency
* Avoiding repeated entries around VWAP
* Monitoring for a confirmed transition into LONG or SHORT

Because the 2-minute timeframe contains significant market noise, the indicator should not be used as a standalone entry system.

It is better suited to filtering direction while entries are determined using price action, market structure, support and resistance, risk management, or another independently tested method.

---

# Recommended Starting Settings

For a standard 2-minute intraday chart:

* Show VWAP: Enabled
* Show Bands: Enabled
* Band Multiplier: 1.0
* Enable Background: Enabled
* Background Transparency: 91
* Show Trend Panel: Enabled

Possible Band Multiplier adjustments:

* 0.8: Narrower and more sensitive bands
* 1.0: Balanced default setting
* 1.2–1.5: Wider bands showing more significant price extension

There is no universal setting that will perform equally well on every instrument or market condition. Parameters should be evaluated separately for the selected symbol, session, and trading style.

---

# Best Market Conditions

The indicator is generally easier to interpret when:

* The market has a clear intraday direction.
* VWAP has a visible positive or negative slope.
* Price remains consistently on one side of VWAP.
* Pullbacks are orderly.
* Trading volume and liquidity are sufficient.
* The market has moved out of an earlier consolidation.

The indicator may become less useful when:

* VWAP is nearly flat.
* Price crosses VWAP repeatedly.
* The market is moving sideways.
* Liquidity is low.
* Price action is highly erratic.
* Major economic news creates extreme short-term volatility.
* A new trading session has only recently started.

---

# Important Limitations

This indicator does not predict future price movements.

A green background does not guarantee that price will continue rising.

A red background does not guarantee that price will continue falling.

VWAP and its slope are calculated from existing price and volume data. As market conditions change, the trend state can also change.

The indicator does not include:

* Entry signals
* Stop-loss levels
* Take-profit levels
* Position sizing
* Risk-to-reward calculations
* Trade management
* Performance statistics
* Strategy backtesting

Users remain responsible for defining their own entry criteria, exit criteria, risk limits, session selection, and position size.

---

# Repainting and Calculation Behavior

The indicator does not use future data, look-ahead settings, or higher-timeframe security requests.

Trend states and alerts are confirmed only after the current candle closes.

Once a historical candle has closed, its confirmed trend state does not change because of later price data.

During the formation of a live candle, the VWAP line and bands may naturally move as price and volume update. However, a new confirmed LONG, SHORT, or NEUTRAL state is registered only at the candle close.

This design helps prevent alerts from being generated by temporary intrabar movements.

---

# Summary

Premium Session VWAP Bands is designed for traders who want a clean and immediate view of intraday direction without using multiple overlapping indicators.

Its interpretation is intentionally simple:

* Green background: price is above a rising VWAP
* Red background: price is below a falling VWAP
* No background: directional conditions are unclear or neutral

The indicator is best used as a trend-direction filter and market-context tool. It should be combined with independently tested entry rules and appropriate risk management.

This indicator is provided for informational and educational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.