OPEN-SOURCE SCRIPT
EMA 5 & E 20 Cross [Dr.K.C.Prakash]

📊 Indicator Name:
EMA 5 & E 20 Cross [Dr.K.C.Prakash]
🧠 Concept:
This is a trend-following indicator built on the concept of Exponential Moving Average (EMA) crossovers, specially optimized for 1-minute intraday trading. It is designed to eliminate noise and provide accurate BUY and SELL signals during strong, sustained market trends — not during minor or choppy price moves.
⚙️ How It Works:
🔹 EMAs Used:
EMA 5: A short-term exponential moving average to quickly track price momentum.
EMA 20: A medium-term exponential moving average to act as a smoother trend anchor.
🔹 Signal Logic:
Buy Signal:
Triggered when EMA 5 stays above EMA 20 for a specified number of consecutive candles (default: 3).
This confirms a sustained bullish crossover.
A green label with "BUY" appears below the bar.
Sell Signal:
Triggered when EMA 5 stays below EMA 20 for the same number of consecutive candles.
This confirms a sustained bearish crossover.
A red label with "SELL" appears above the bar.
🧹 Noise Reduction:
Filters out fakeouts or “whipsaws” by requiring that the crossover condition persists for a number of bars (minTrendBars).
Greatly improves signal reliability, especially on 1-minute timeframes, where price action is volatile.
📈 Visual Elements:
Orange Line: EMA 5
Blue Line: EMA 20
Green “BUY” label: Below candle when bullish trend confirms
Red “SELL” label: Above candle when bearish trend confirms
✅ Ideal Use Case:
Intraday trading
1-minute timeframe
Traders who want to catch longer trends and ignore short-term fluctuations
🔧 Customizable Inputs:
Short EMA Length: Default 5 (can be changed)
Long EMA Length: Default 20 (can be changed)
Min Bars to Confirm Trend: Default 3 (defines how long crossover must persist to count as a valid signal)
🛠️ Add-On Ideas (Optional Enhancements):
Would you like to add any of the following?
📢 TradingView alerts (Buy/Sell notifications)
🔁 Re-entry signals in same trend direction
📊 Combine with Volume filter or ATR breakout confirmation
EMA 5 & E 20 Cross [Dr.K.C.Prakash]
🧠 Concept:
This is a trend-following indicator built on the concept of Exponential Moving Average (EMA) crossovers, specially optimized for 1-minute intraday trading. It is designed to eliminate noise and provide accurate BUY and SELL signals during strong, sustained market trends — not during minor or choppy price moves.
⚙️ How It Works:
🔹 EMAs Used:
EMA 5: A short-term exponential moving average to quickly track price momentum.
EMA 20: A medium-term exponential moving average to act as a smoother trend anchor.
🔹 Signal Logic:
Buy Signal:
Triggered when EMA 5 stays above EMA 20 for a specified number of consecutive candles (default: 3).
This confirms a sustained bullish crossover.
A green label with "BUY" appears below the bar.
Sell Signal:
Triggered when EMA 5 stays below EMA 20 for the same number of consecutive candles.
This confirms a sustained bearish crossover.
A red label with "SELL" appears above the bar.
🧹 Noise Reduction:
Filters out fakeouts or “whipsaws” by requiring that the crossover condition persists for a number of bars (minTrendBars).
Greatly improves signal reliability, especially on 1-minute timeframes, where price action is volatile.
📈 Visual Elements:
Orange Line: EMA 5
Blue Line: EMA 20
Green “BUY” label: Below candle when bullish trend confirms
Red “SELL” label: Above candle when bearish trend confirms
✅ Ideal Use Case:
Intraday trading
1-minute timeframe
Traders who want to catch longer trends and ignore short-term fluctuations
🔧 Customizable Inputs:
Short EMA Length: Default 5 (can be changed)
Long EMA Length: Default 20 (can be changed)
Min Bars to Confirm Trend: Default 3 (defines how long crossover must persist to count as a valid signal)
🛠️ Add-On Ideas (Optional Enhancements):
Would you like to add any of the following?
📢 TradingView alerts (Buy/Sell notifications)
🔁 Re-entry signals in same trend direction
📊 Combine with Volume filter or ATR breakout confirmation
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。