Permabull Profit Ratio
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © slopip

//@version=5
indicator("Permabull Profit Ratio", overlay=false, scale=scale.right)
import slopip/bullratio/1 as br

len = input.int(21, "Number of candles- 0 for start of chart")

bullratio = br.bullratio(len)
colors = (bullratio) < 0 ? color.red: color.green
plot(bullratio, color=colors)

hline(0, title="Zero", color=color.gray, linestyle=hline.style_dashed)

