I will say this again. I create my own version of this DeltaScalper. this is to mirror the indicator, it is not the same. Leaving the TV code for some that already asked for:
//@version=6
indicator("Clean Color Custom Imbalance", overlay=true)
// Inputs
int volumePeriod = input.int(20, "Volume Lookback")
float volumeMultiplier = input.float(1.5, "Volume Multiplier")
// COLOR OPTIONS
color bullLineColor = input.color(color.green, "Bullish Line Color")
color bearLineColor = input.color(color.red, "Bearish Line Color")
color bullLabelColor = input.color(color.green, "Bullish Label Color")
color bearLabelColor = input.color(color.red, "Bearish Label Color")
color textColor = input.color(color.white, "Text Color")
// STYLE OPTIONS
int lineWidth = input.int(2, "Line Width", minval=1, maxval=5)
int lineLength = input.int(40, "Line Length")
// Detection
float avgVolume = ta.sma(volume, volumePeriod)
bool highVolume = volume > avgVolume * volumeMultiplier
float bodyRatio = math.abs(close - open) / (high - low)
bool strongBullish = highVolume and close > open and bodyRatio > 0.6
bool strongBearish = highVolume and close < open and bodyRatio > 0.6
// Draw imbalances
if strongBullish
line.new(bar_index, low, bar_index + lineLength, low,
color=bullLineColor, width=lineWidth)
label.new(bar_index, low, "BULL", color=bullLabelColor,
textcolor=textColor, style=label.style_label_up)
if strongBearish
line.new(bar_index, high, bar_index + lineLength, high,
color=bearLineColor, width=lineWidth)
label.new(bar_index, high, "BEAR", color=bearLabelColor,
textcolor=textColor, style=label.style_label_down)