EMA Mountains
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © AndrewGlouberman

//@version=5
indicator("EMA Mountain v2", overlay=false)

show1 = input(true, "Show Mountain 1")
len1 = input(7, "EMA Length 1")
len2 = input(63, "EMA Length 2")

show2 = input(false, "Show Mountain 2")
len3 = input(126, "EMA Length 3")
len4 = input(189, "EMA Length 4")

show3 = input(false, "Show Mountain 3")
len5 = input(252, "EMA Length 4")
len6 = input(315, "EMA Length 5")

show4 = input(false, "Show Mountain 4")
len7 = input(7, "EMA Length 6")
len8 = input(21, "EMA Length 7")



ema1 = ta.ema(close, len1)
ema2 = ta.ema(close, len2)

ema1plot = plot(show1 ? ema1 : na, color=#7698f5, style=plot.style_line, linewidth=4, title="Drews Car")
ema2plot = plot(show1 ? ema2 : na, color=#f00b0b, style=plot.style_line, linewidth=1, title="63 EMA")
fill(ema1plot, ema2plot, color=ema1 > ema2 ? color.new(color.green, 80) : color.new(color.red, 80))

//
ema3 = ta.ema(close, len3)
ema4 = ta.ema(close, len4)

ema3plot = plot(show2 ? ema3 : na, color=#4caf50, style=plot.style_line, linewidth=2, title="126 EMA")
ema4plot = plot(show2 ? ema4 : na, color=#00bcd4, style=plot.style_line, linewidth=2, title="189 EMA")
fill(ema3plot, ema4plot, color=ema3 > ema4 ? color.new(color.teal, 80) : color.new(color.red, 80))

//
ema5 = ta.ema(close, len5)
ema6 = ta.ema(close, len6)

ema5plot = plot(show3 ? ema5 : na, color=#ffeb3b, style=plot.style_line, linewidth=3, title="252 EMA")
ema6plot = plot(show3 ? ema6 : na, color=#f06292, style=plot.style_line, linewidth=3, title="315 EMA")
fill(ema5plot, ema6plot, color=ema5 > ema6 ? color.new(color.yellow, 80) : color.new(color.red, 80))

//
ema7 = ta.ema(close, len7)
ema8 = ta.ema(close, len8)

ema7plot = plot(show4 ? ema7 : na, color=#ffeb3b, style=plot.style_line, linewidth=3, title="7 EMA")
ema8plot = plot(show4 ? ema8 : na, color=#f06292, style=plot.style_line, linewidth=3, title="21 EMA")
fill(ema7plot, ema8plot, color=ema7 > ema8 ? color.new(color.yellow, 80) : color.new(color.red, 80))




