LinearityFinder
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AlexD169

//@version=5
indicator(title="LinearityFinder")

period = input(24)
mixing = input(1000)

smoothed_volume_tmp    = ta.sma(volume, period)
standart_deviation_tmp = ta.stdev(close, period)

smoothed_volume_mixed    = ta.stoch(smoothed_volume_tmp, smoothed_volume_tmp, smoothed_volume_tmp, mixing)
standart_deviation_mixed = ta.stoch(standart_deviation_tmp, standart_deviation_tmp, standart_deviation_tmp, mixing)

plot(smoothed_volume_mixed, title="Volume", color=color.yellow)
plot(standart_deviation_mixed, title="StdDev", color=color.aqua)