OPEN-SOURCE SCRIPT
Custom EMA High/Low & SMA - [GSK-VIZAG-AP-INDIA]

Custom EMA High/Low & SMA - [GSK-VIZAG-AP-INDIA]
1. Overview
This indicator overlays a dynamic combination of Exponential Moving Averages (EMA) and Simple Moving Average (SMA) to identify momentum shifts and potential entry/exit zones. It highlights bullish or bearish conditions using color-coded SMA logic and provides visual Buy/Sell signals based on smart crossover and state-based logic.
2. Purpose / Use Case
Designed for traders who want to visually identify momentum breakouts, trend reversals, or pullback opportunities, this tool helps:
Spot high-probability buy/sell zones
Confirm price strength relative to volatility bands (EMA High/Low)
Time entries based on clean visual cues
It works well in trend-following strategies, particularly in intraday or swing setups across any liquid market (indices, stocks, crypto, etc.).
3. Key Features & Logic
✅ EMA High/Low Channel: Acts as dynamic support/resistance boundaries using 20-period EMAs on high and low prices.
✅ Timeframe-Specific SMA: A 33-period SMA calculated from a user-defined timeframe (default: 10-minute) for flexible multi-timeframe analysis.
✅ Signal Generation:
Buy: When SMA drops below EMA Low and close is above EMA High.
Sell: When SMA rises above EMA High and price closes below both EMAs.
Optionally, signals also fire based on SMA color changes (green = bullish, red = bearish).
✅ Strict or Loose Signal Logic: Choose between precise crossovers or broader state-based conditions.
✅ Debugging Tools: Optional markers for granular insight into condition logic.
4. User Inputs & Settings
Input Description
EMA High Length Period for EMA of high prices (default: 20)
EMA Low Length Period for EMA of low prices (default: 20)
SMA Length Period for Simple Moving Average (default: 33)
SMA Timeframe Timeframe for SMA (default: “10”)
Show Buy/Sell Arrows Enable visual arrow signals for Buy/Sell
Strict Signal Logic ON = crossover-based signals; OFF = state logic
Plot Signals on SMA Color Change Enable signals on SMA color shifts (Green/Red)
Show Debug Markers Plot small markers to debug condition logic
5. Visual Elements Explained
🔵 EMA High Line – Blue line marking dynamic resistance
🔴 EMA Low Line – Red line marking dynamic support
🟡 SMA Line – Color-coded based on position:
Green if SMA < EMA Low (Bullish)
Red if SMA > EMA High (Bearish)
Yellow otherwise (Neutral)
✅ BUY / SELL Labels – Displayed below or above candles on valid signals
🛠️ Debug Circles/Triangles – Help visually understand the signal logic when enabled
6. Usage Tips
Best used on 5–30 min timeframes for intraday setups or 1H+ for swing trades.
Confirm signals with volume, price action, or other confluences (like support/resistance).
Use strict mode for more accurate entries, and non-strict mode for broader trend views.
Ideal for identifying pullbacks into trend, or early reversals after volatility squeezes.
7. What Makes It Unique
Multi-timeframe SMA integrated with EMA High/Low bands
Dual signal logic (crossover + color shift)
Visually intuitive and beginner-friendly
Minimal clutter with dynamic signal labeling
Debug mode for transparency and learning
8. Alerts & Automation
The indicator includes built-in alert conditions for:
📈 Buy Alert: Triggered when a bullish condition is detected.
🔻 Sell Alert: Triggered when bearish confirmation is detected.
These alerts can be used with TradingView's alert system for real-time notifications or bot integrations.
9. Technical Concepts Used
EMA (Exponential Moving Average): Reacts faster to recent price, ideal for trend channels
SMA (Simple Moving Average): Smoother average for detecting general trend direction
Crossover Logic: Checks when SMA crosses over or under EMA levels
Color Coding: Visual signal enhancement based on relative positioning
Multi-Timeframe Analysis: SMA calculated on a custom timeframe, powerful for confirmation
10. Disclaimer
This script is for educational and informational purposes only. It is not financial advice. Always backtest thoroughly and validate on demo accounts before applying to live markets. Trading involves risk, and past performance does not guarantee future results.
11. Author Signature
📌 Indicator Name: Custom EMA High/Low & SMA - [GSK-VIZAG-AP-INDIA]
👤 Author: GSK-VIZAG-AP-INDIA
1. Overview
This indicator overlays a dynamic combination of Exponential Moving Averages (EMA) and Simple Moving Average (SMA) to identify momentum shifts and potential entry/exit zones. It highlights bullish or bearish conditions using color-coded SMA logic and provides visual Buy/Sell signals based on smart crossover and state-based logic.
2. Purpose / Use Case
Designed for traders who want to visually identify momentum breakouts, trend reversals, or pullback opportunities, this tool helps:
Spot high-probability buy/sell zones
Confirm price strength relative to volatility bands (EMA High/Low)
Time entries based on clean visual cues
It works well in trend-following strategies, particularly in intraday or swing setups across any liquid market (indices, stocks, crypto, etc.).
3. Key Features & Logic
✅ EMA High/Low Channel: Acts as dynamic support/resistance boundaries using 20-period EMAs on high and low prices.
✅ Timeframe-Specific SMA: A 33-period SMA calculated from a user-defined timeframe (default: 10-minute) for flexible multi-timeframe analysis.
✅ Signal Generation:
Buy: When SMA drops below EMA Low and close is above EMA High.
Sell: When SMA rises above EMA High and price closes below both EMAs.
Optionally, signals also fire based on SMA color changes (green = bullish, red = bearish).
✅ Strict or Loose Signal Logic: Choose between precise crossovers or broader state-based conditions.
✅ Debugging Tools: Optional markers for granular insight into condition logic.
4. User Inputs & Settings
Input Description
EMA High Length Period for EMA of high prices (default: 20)
EMA Low Length Period for EMA of low prices (default: 20)
SMA Length Period for Simple Moving Average (default: 33)
SMA Timeframe Timeframe for SMA (default: “10”)
Show Buy/Sell Arrows Enable visual arrow signals for Buy/Sell
Strict Signal Logic ON = crossover-based signals; OFF = state logic
Plot Signals on SMA Color Change Enable signals on SMA color shifts (Green/Red)
Show Debug Markers Plot small markers to debug condition logic
5. Visual Elements Explained
🔵 EMA High Line – Blue line marking dynamic resistance
🔴 EMA Low Line – Red line marking dynamic support
🟡 SMA Line – Color-coded based on position:
Green if SMA < EMA Low (Bullish)
Red if SMA > EMA High (Bearish)
Yellow otherwise (Neutral)
✅ BUY / SELL Labels – Displayed below or above candles on valid signals
🛠️ Debug Circles/Triangles – Help visually understand the signal logic when enabled
6. Usage Tips
Best used on 5–30 min timeframes for intraday setups or 1H+ for swing trades.
Confirm signals with volume, price action, or other confluences (like support/resistance).
Use strict mode for more accurate entries, and non-strict mode for broader trend views.
Ideal for identifying pullbacks into trend, or early reversals after volatility squeezes.
7. What Makes It Unique
Multi-timeframe SMA integrated with EMA High/Low bands
Dual signal logic (crossover + color shift)
Visually intuitive and beginner-friendly
Minimal clutter with dynamic signal labeling
Debug mode for transparency and learning
8. Alerts & Automation
The indicator includes built-in alert conditions for:
📈 Buy Alert: Triggered when a bullish condition is detected.
🔻 Sell Alert: Triggered when bearish confirmation is detected.
These alerts can be used with TradingView's alert system for real-time notifications or bot integrations.
9. Technical Concepts Used
EMA (Exponential Moving Average): Reacts faster to recent price, ideal for trend channels
SMA (Simple Moving Average): Smoother average for detecting general trend direction
Crossover Logic: Checks when SMA crosses over or under EMA levels
Color Coding: Visual signal enhancement based on relative positioning
Multi-Timeframe Analysis: SMA calculated on a custom timeframe, powerful for confirmation
10. Disclaimer
This script is for educational and informational purposes only. It is not financial advice. Always backtest thoroughly and validate on demo accounts before applying to live markets. Trading involves risk, and past performance does not guarantee future results.
11. Author Signature
📌 Indicator Name: Custom EMA High/Low & SMA - [GSK-VIZAG-AP-INDIA]
👤 Author: GSK-VIZAG-AP-INDIA
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
"Created by GSK-VIZAG-AP-INDIA"
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
"Created by GSK-VIZAG-AP-INDIA"
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.