Kiss Of Death
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © thanos300693

//@version=5
indicator('Kiss Of Death', overlay = true)
plot(close)

// Define the 21 EMA
ema21 = ta.ema(close, 21)

// Define the previous low
prev_low = ta.lowest(low, 2)

// Define the signal conditions
kiss_of_death_signal = close < ema21 and close[1] >= ema21 and low < prev_low

// Plot the 21 EMA
plot(ema21, color=color.blue, title="21 EMA")

// Plot the "Kiss of Death" signal with a downward-pointing triangle above the bar
plotshape(series=kiss_of_death_signal, title="Kiss of Death Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size = size.auto)