//@version=6
indicator("Cumulative Volume Delta + VWAP + EMA & Volume OWI By ADK", "ADK CVD", format=format.volume)
import TradingView/ta/12
anchorInput = input.timeframe("1D", "Anchor Period", group = "CVD Settings")
dataAggregationTooltip = "Defines how lower timeframe data is aggregated for the delta calculation. \"1 tick\" computes the delta on tick data and is available only on expert plans."
dataAggregationInput = input.string("Time", "Data Aggregation", options = ["Time", "1 tick"], tooltip = dataAggregationTooltip, group = "CVD Settings")
useTicks = dataAggregationInput == "1 tick"
lowerTimeframeTooltip = "The indicator scans lower timeframe data to approximate up and down volume used in the delta calculation. By default, the timeframe is chosen automatically. These inputs override this with a custom timeframe."
+ " \n\nHigher timeframes provide more historical data, but the data will be less precise."
useCustomTimeframeInput = input.bool(true, "Custom timeframe", tooltip = lowerTimeframeTooltip, active = not useTicks, group = "CVD Settings")
lowerTimeframeInput = input.timeframe("", "Timeframe", active = useCustomTimeframeInput and not useTicks, group = "CVD Settings")
var lowerTimeframe = switch
useTicks => "1T"
useCustomTimeframeInput => lowerTimeframeInput
timeframe.isseconds => "1S"
timeframe.isintraday => "1"
timeframe.isdaily => "5"
=> "60"
[openVolume, maxVolume, minVolume, lastVolume] = ta.requestVolumeDelta(lowerTimeframe, anchorInput)
col = lastVolume >= openVolume ? color.blue : color.red
hline(0)
plotcandle(openVolume, maxVolume, minVolume, lastVolume, "CVD", color = col, bordercolor = col, wickcolor = col)
newSession = timeframe.change("1D")
// ──────────────── CVD VWAP (हमेशा daily session-reset — यही practical/useful hai) ────────────────
showCvdVwapInput = input.bool(false, "Show CVD VWAP", group = "CVD VWAP")
var float vwapNumSession = 0.0
var float vwapDenSession = 0.0
if newSession
vwapNumSession := 0.0
vwapDenSession := 0.0
if not na(lastVolume) and not na(volume)
vwapNumSession += lastVolume * volume
vwapDenSession += volume
cvdVwap = vwapDenSession > 0 ? vwapNumSession / vwapDenSession : na
plot(showCvdVwapInput ? cvdVwap : na, "CVD VWAP", color = color.new(color.black, 0), linewidth = 2)
// ──────────────── CVD EMA (हमेशा continuous — ta.ema khud hi short-memory hai, reset ki zaroorat nahi) ────────────────
showMaInput = input.bool(false, "Show CVD EMA", group = "CVD EMA")
maLengthInput = input.int(20, "EMA Length", minval = 1, group = "CVD EMA")
cvdEma = ta.ema(lastVolume, maLengthInput)
plot(showMaInput ? cvdEma : na, "CVD EMA", color = color.new(color.fuchsia, 0), linewidth = 1)
var cumVol = 0.
cumVol += nz(volume)
deltaIsNa = na(openVolume) and na(maxVolume) and na(minVolume) and na(lastVolume)
if barstate.islast
if cumVol == 0
runtime.error("The data vendor doesn't provide volume data for this symbol.")
if str.endswith(lowerTimeframe, "T") and deltaIsNa
runtime.error("Not enough tick depth for the current anchor period. The available tick depth ends before reaching the start of the anchor period (" + anchorInput + "). Please shorten the 'Anchor period' input or switch the calculation base from '1 Tick' to 'Time' or higher custom timeframe.")
// ==================== VOWI SECTION ====================
showVOWI = input.bool(false, "Show Vol-OWI", group = "VOWI Settings")
smaLength = input.int(20, "SMA Length", group = "VOWI Settings")
useTimeFilter = input.bool(true, "Enable Time Filter", group = "VOWI Settings")
startHour = input.int(9, "Start Hour (ET)", group = "VOWI Settings")
startMinute = input.int(45, "Start Minute (ET)", group = "VOWI Settings")
endHour = input.int(16, "End Hour (ET)", group = "VOWI Settings")
endMinute = input.int(15, "End Minute (ET)", group = "VOWI Settings")
// Volume calculations
buyVolume = high == low ? 0.0 : volume * (close - low) / (high - low)
sellVolume = high == low ? 0.0 : volume * (high - close) / (high - low)
// Time filter
startTime = timestamp("America/New_York", year, month, dayofmonth, startHour, startMinute)
endTime = timestamp("America/New_York", year, month, dayofmonth, endHour, endMinute)
isUSMarketTime = time >= startTime and time <= endTime
// Plot volume columns (only when showVOWI is true)
plot(showVOWI ? volume : na, "SELL V", color = color.red, style = plot.style_columns)
plot(showVOWI ? buyVolume : na, "BUY V", color = color.green, style = plot.style_columns)
Overview
Cumulative Volume Delta + VWAP + EMA & Volume OWI By ADK aggregates lower-timeframe or tick volume data over a customizable anchor period. Users can optionally display a volume-weighted CVD VWAP with daily session resets, an exponential moving average of the CVD, and volume OWI metrics. Input controls allow tweaking data aggregation modes, manual timeframe overrides, and session time filters.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Anchor Period
timeframe
1D
anchorInput
Data Aggregation
string
Time
dataAggregationInput
Custom timeframe
bool
true
useCustomTimeframeInput
Timeframe
timeframe
lowerTimeframeInput
Show CVD VWAP
bool
false
showCvdVwapInput
Show CVD EMA
bool
false
showMaInput
EMA Length
int
20
maLengthInput
Show Vol-OWI
bool
false
showVOWI
SMA Length
int
20
smaLength
Enable Time Filter
bool
true
useTimeFilter
Start Hour (ET)
int
9
startHour
Start Minute (ET)
int
45
startMinute
Show all 14 settings
Setting
Type
Default
Variable
End Hour (ET)
int
16
endHour
End Minute (ET)
int
15
endMinute
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
Calculates On-Balance Volume (OBV) alongside two Exponential Moving Averages (EMAs) applied directly to the cumulative OBV line. The indicator tracks volume flow relative to price movement and smooths it using short-term and longer-term EMAs to highlight volum
Aggregate Signal (v.2) is an oscillator indicator that combines multiple technical factors into a single composite score. It scales OHLCV data using minimax normalization and evaluates indicators such as MACD, RSI, Stochastic, CCI, Momentum, On-Balance Volume,
This indicator plots a volume-weighted MACD in a separate pane. It subtracts a slow volume-weighted moving average of close from a faster one, then smooths that line with an exponential moving average to form the signal. A column histogram shows the gap betwee
PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l
This indicator calculates the Relative Strength Index using a volume-weighted moving average of the closing price as its source. It plots the resulting oscillator in a separate pane alongside configurable overbought and oversold threshold lines. The plot line
This indicator tracks and visualizes cryptocurrency net positioning across multiple derivative exchanges, including Binance, BitMEX, and Kraken. It calculates aggregated net longs, net shorts, net delta, and ratio metrics, or an optional Position RSI, renderin