Re: Session Overlap Volatility Scalping
Posted: Tue Sep 22, 2026 6:01 pm
High volume during the overlap is guaranteed, but clarity is not. If algorithms are just passing heavy inventory back and forth inside the London range, volume spikes, but the trend dies.
To filter this, I’ve integrated the Average Directional Index (ADX) into the script. ADX doesn't care if the market is going up or down, and it doesn't care about volume; it strictly measures trend strength. If the ADX drops below a certain threshold (usually 20-25), it mathematically confirms the market is in a choppy, non-directional state.
Here is the updated Pine Script. It now dynamically changes the color of the NY Overlap background to warn you when the market is chopping.
The "Clarity Over Volume" Session Filter (Pine Script v5)
To filter this, I’ve integrated the Average Directional Index (ADX) into the script. ADX doesn't care if the market is going up or down, and it doesn't care about volume; it strictly measures trend strength. If the ADX drops below a certain threshold (usually 20-25), it mathematically confirms the market is in a choppy, non-directional state.
Here is the updated Pine Script. It now dynamically changes the color of the NY Overlap background to warn you when the market is chopping.
The "Clarity Over Volume" Session Filter (Pine Script v5)
Code: Select all
//@version=5
indicator("London Range vs NY Overlap [Chop Filter]", overlay=true)
// --- Session & Time Inputs ---
londonSession = input.session("0700-1300", title="Early/Mid London Session")
overlapSession = input.session("1300-1700", title="London/NY Overlap")
tz = input.string("UTC", title="Timezone")
// --- Chop Filter Inputs ---
adxLen = input.int(14, title="ADX Length", group="Chop Filter")
adxThreshold = input.int(25, title="ADX Chop Threshold", group="Chop Filter", tooltip="ADX below 25 generally indicates ranging/choppy conditions.")
// --- Session Logic ---
inLondon = time(timeframe.period, londonSession, tz)
inOverlap = time(timeframe.period, overlapSession, tz)
// --- Track Early London Range ---
var float londonHigh = na
var float londonLow = na
if inLondon and not inLondon[1]
londonHigh := high
londonLow := low
else if inLondon
londonHigh := math.max(londonHigh, high)
londonLow := math.min(londonLow, low)
// --- Trend/Chop Filter (ADX) ---
// ta.dmi returns [DI+, DI-, ADX]. We only need the ADX line to gauge trend strength.
[diPlus, diMinus, adx] = ta.dmi(adxLen, adxLen)
// It is considered "choppy" if directional momentum falls below our threshold
isChoppy = adx < adxThreshold
// --- Dynamic Background Highlighting ---
// Overlap background warns you based on market state:
// RED = Choppy (High risk of mean-reversion/chop)
// GREEN = Trending (Clear permission window)
overlapColor = isChoppy ? color.new(color.red, 92) : color.new(color.green, 92)
bgcolor(inLondon ? color.new(color.blue, 92) : na, title="London Background")
bgcolor(inOverlap ? overlapColor : na, title="Overlap Background")
// --- Plotting the Range ---
showLines = inLondon or inOverlap
plot(showLines ? londonHigh : na, color=color.new(color.blue, 30), style=plot.style_linebr, linewidth=2, title="London High")
plot(showLines ? londonLow : na, color=color.new(color.blue, 30), style=plot.style_linebr, linewidth=2, title="London Low")
// Midpoint is highly useful for spotting algorithmic mean-reversion during chop
londonMid = (londonHigh + londonLow) / 2
plot(showLines ? londonMid : na, color=color.new(color.gray, 50), style=plot.style_cross, linewidth=1, title="London Midpoint")
// --- Visual Safety Markers ---
// Plots small indicators at the bottom of the screen during the Overlap
plotshape(inOverlap and isChoppy, style=shape.xcross, location=location.bottom, color=color.new(color.red, 50), size=size.tiny, title="Chop Warning")
plotshape(inOverlap and not isChoppy, style=shape.circle, location=location.bottom, color=color.new(color.green, 50), size=size.tiny, title="Trend Active")