Credit goes to the original writer of the script, Quantadelic, who generously allowed anyone to copy/edit. I adjusted the value of the bottom/top intercept and slope to better fit the March 2020 coronavirus dip.
Use Bitstamp BTCUSD for better reading.