// === Support and Resistance === support = ta.lowest(close, 20) resistance = ta.highest(close, 20)
// Draw Support and Resistance Levels if showSupportResistance line.new(bar_index - 1, support, bar_index, support, color=color.green, width=1, style=line.style_dotted) line.new(bar_index - 1, resistance, bar_index, resistance, color=color.red, width=1, style=line.style_dotted)
// === Candlestick Patterns === bullishEngulfing = ta.crossover(close, open[1]) and close > open bearishEngulfing = ta.crossunder(close, open[1]) and close < open
// Label Candlestick Patterns if showCandlestickPatterns if bullishEngulfing label.new(bar_index, high, "Bullish Engulfing", color=color.new(color.green, 0), style=label.style_label_down) if bearishEngulfing label.new(bar_index, low, "Bearish Engulfing", color=color.new(color.red, 0), style=label.style_label_up)