5 Comments
User's avatar
Diederik's avatar

Hi Kasper! Do you have the link to the momentumindicator, as promised on fridaynight? By the way, a lot of fun these live calls 🙏

Expand full comment
USELINK's avatar

//@version=5

indicator("MA Bands with Dynamic Colors", overlay=true)

// Calculate exponential moving averages

ma50 = ta.ema(close, 50)

ma100 = ta.ema(close, 100)

ma200 = ta.ema(close, 200)

// Determine color conditions

both_above = ma50 > ma200 and ma100 > ma200

both_below = ma50 < ma200 and ma100 < ma200

mixed = (ma50 > ma200 and ma100 < ma200) or (ma50 < ma200 and ma100 > ma200)

// Set fill color based on conditions (written in a single line to avoid continuation issues)

fill_color = both_above ? color.new(color.green, 70) : both_below ? color.new(color.red, 70) : color.new(color.blue, 70)

// Plot moving averages

plot(ma50, "MA50", color=color.green)

plot(ma100, "MA100", color=color.red)

plot(ma200, "MA200", color=color.orange)

// Fill between MAs with dynamic color

fill(plot(ma50), plot(ma100), color=fill_color, title="50-100 Fill")

fill(plot(ma100), plot(ma200), color=fill_color, title="100-200 Fill")

// Plot price

plot(close, "Price", color=color.black, linewidth=1, style=plot.style_line)

Expand full comment
Diederik's avatar

Thanks Kasper

Expand full comment
Robert Maxwell's avatar

Calibre is a 4 multiple at these prices!

Expand full comment
USELINK's avatar

its looking good yes!! huge huge base/bottom structure

Expand full comment