TTP Big Whale Explorer
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TheTradingParrot

//@version=5
indicator("TTP Big Whale Explorer", overlay = false)


exp = request.security("INTOTHEBLOCK:BTC_LARGEHOLDERSINFLOWS-INTOTHEBLOCK:BTC_LARGEHOLDERSOUTFLOWS", "1D", close)

ema50 = ta.ema(exp, 50)
ema200 = ta.ema(exp, 200)
ratio = ema50 / ema200

showEMA = input.bool(true, "Enable", group = "EMA")
emaLength = input.int(20, "lenght", group = "EMA")

emaratio = ta.ema(ratio, emaLength)
plot(showEMA ? emaratio : na, color = color.new(color.yellow, 50))

c = color.from_gradient(ratio, 0, 2, color.rgb(0, 255, 0, 50), color.rgb(255, 0, 0))
plot(ratio, "ratio", color = c)


hline(1,color = color.new(color.white, 30))
hline(1.5)
hline(0.5)
hline(2)
hline(0)

