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

//@version=5
indicator("Background Zones", overlay=true)

bull    = input.int(1800, "Bullish Zone")
n_upper = input.int(500, "Neutral Zone upper")
n_lower = input.int(-500, "Neutral Zone lower")
bear    = input.int(-1800, "Bearish Zone")

top             = hline(9999, "Ceiling")
bull_line       = hline(bull, "Bullish line", color=color.gray, linestyle=hline.style_dashed)
n_upper_line    = hline(n_upper, "Neutral Upper line", color=color.gray, linestyle=hline.style_dashed)
zero            = hline(0, "Zero line", color=color.gray, linestyle=hline.style_dashed, linewidth=2)
n_lower_line    = hline(n_lower, "Neutral Lower line", color=color.gray, linestyle=hline.style_dashed)
bear_line       = hline(bear, "Bearish line", color=color.gray, linestyle=hline.style_dashed)
bottom          = hline(-9999, "Floor")

fill(top, bull_line,title="Zone 1", color=color.new(color.green,80))
fill(bull_line, n_upper_line,title="Zone 2", color=color.new(color.green,95))
fill(n_upper_line, n_lower_line,title="Zone 3", color=color.new(color.gray,90))
fill(bear_line, n_lower_line,title="Zone 4", color=color.new(color.red,95))
fill(bear_line, bottom,title="Zone 5", color=color.new(color.red,80))

