EMI

Wait 5 sec.

EMINifty 50 IndexNSE:NIFTYIMKarthikK//@version=5 indicator("Nifty Multi-Indicator Trend Analyzer", overlay=true) // === INPUTS === emaFastLen = input.int(20, title="Fast EMA Length") emaSlowLen = input.int(50, title="Slow EMA Length") rsiLen = input.int(14, title="RSI Length") rsiOverbought = input.int(70, title="RSI Overbought") rsiOversold = input.int(30, title="RSI Oversold") // === MOVING AVERAGES === emaFast = ta.ema(close, emaFastLen) emaSlow = ta.ema(close, emaSlowLen) // === RSI === rsi = ta.rsi(close, rsiLen) // === MACD === = ta.macd(close, 12, 26, 9) // === TREND CONDITIONS === // Price Action Trend lowerHigh = high < high and high < high lowerLow = low < low // EMA Trend emaBearish = emaFast < emaSlow emaBullish = emaFast > emaSlow // RSI Trend rsiBearish = rsi < 50 rsiBullish = rsi > 50 // MACD Confirmation macdBearish = macdLine < signalLine macdBullish = macdLine > signalLine // === FINAL TREND SIGNALS === strongBearish = emaBearish and rsiBearish and macdBearish and lowerHigh strongBullish = emaBullish and rsiBullish and macdBullish and not lowerHigh // === PLOTS === plot(emaFast, color=color.orange, title="EMA 20") plot(emaSlow, color=color.blue, title="EMA 50") bgcolor(strongBearish ? color.red : na, transp=85) bgcolor(strongBullish ? color.green : na, transp=85) // === SIGNAL LABELS === plotshape(strongBearish, title="Bearish Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL") plotshape(strongBullish, title="Bullish Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY") // === RSI & MACD Display (Optional) === rsiPlot = input.bool(true, "Show RSI in Separate Pane?") if rsiPlot indicator("RSI", overlay=false) plot(rsi, color=color.purple, title="RSI") hline(50, "Midline", color=color.gray) hline(rsiOverbought, "Overbought", color=color.red) hline(rsiOversold, "Oversold", color=color.green)