Hello, this indicator looks for bars with significant average median volume, but only bars with an average median volume greater than 62% of the maximum detected in 89 previous bars will be painted, the detection of this event indicates a relevant supply and demand zone, which can be used as support / resistance, is a good tool for negotiation with price action, greetings
thinkScript Code (With Lower Study and Paint Bars)
Code:
# CRITICAL VOLUME X
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/KT6klFAT-CRITICAL-VOLUME-X/
declare lower;
def volmax = highest(volume, 89);
def vol = volume * 100 / volmax * 4 / 5;
def volpmed = expAverage(vol, 21);
def hvpm = vol - volpmed;
def niv_crit = highest(hvpm, 89) * 0.618;
def x = hvpm > 0 and hvpm >= niv_crit;
assignPriceColor(if x then color.white else color.current);
plot histogram = hvpm;
histogram.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
histogram.assignValueColor(if hvpm > 0 and hvpm<niv_crit then color.blue else if hvpm > 0 and hvpm >= niv_crit then color.red else color.white);
thinkScript Code (Without the Lower Study. Only Paint Bars)
Code:
# CRITICAL VOLUME X
# Assembled by BenTen at useThinkScript.com
# Converted from https://www.tradingview.com/script/KT6klFAT-CRITICAL-VOLUME-X/
def volmax = highest(volume, 89);
def vol = volume * 100 / volmax * 4 / 5;
def volpmed = expAverage(vol, 21);
def hvpm = vol - volpmed;
def niv_crit = highest(hvpm, 89) * 0.618;
def x = hvpm > 0 and hvpm >= niv_crit;
assignPriceColor(if x then color.white else color.current);
Last edited by a moderator: