EXPERIMENTAL: swing directional bias convergence.
study("[RS]HL Swing Convergence V0", overlay=true) length = input(4) sh = sma(high, length) sl = sma(low, length) hh = highest(sh, length) ll = lowest(sl, length) swingH = high > hh[1] or low > nz(swingL[1]) ? sl : na swingL = low < ll[1] or high < nz(swingH[1]) ? sh : na devH = swingH - stdev(sh, length) devL = swingL + stdev(sl, length) plot(swingH, style=linebr, color=green, linewidth=3) plot(swingL, style=linebr, color=maroon, linewidth=3) plot(devH, style=linebr, color=green, linewidth=1) plot(devL, style=linebr, color=maroon, linewidth=1)