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

//@version=4

study("st_limits", overlay = true)

n = input(30, step = 1, title = 'period')

h = highest(high, n)
l = lowest(low, n)

m1 = input(0.34, step = 0.01, title = 'koeff for min')
m2 = input(2.40, step = 0.01, title = 'koeff for max')

lh = h*m1
ll = l*m2


plot(lh, color=#00ffaa, linewidth = 2)
plot(ll, color=#ff1a00, linewidth = 2)