Bitcoin Price Temperature: Weekly Timeframe
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MJShahsavar

//@version=5
indicator("Bitcoin Price Temperature: Weekly Timeframe", timeframe = "W")
a=ta.sma(close, 208)
b=close-a
c=ta.stdev(close, 208)
d=b/c
h1=hline (0.2,  color=color.green, linewidth = 2)
h2= hline (6, color=color.red, linewidth = 2)
h3= hline (3, color=color.black, linewidth = 2)
BPT = d >= 6 ? color.blue : d <= 0.2 ? color.red : color.maroon
plot (d, "BPT" , d >= 6 ? color.red : d <= 0.2 ? color.green : color.blue,  linewidth=1)
