PROTECTED SOURCE SCRIPT
📱 EMA Stability Mobile + Pulse BG + Alerts (edegrano)

User Manual: 📱 EMA Stability Mobile + Pulse BG + Alerts
Overview
This indicator monitors the stability of the market trend by analyzing the relative positions and gaps between the 50, 100, and 200 EMAs (Exponential Moving Averages) on a user-defined higher timeframe. It detects when the EMAs align bullishly or bearishly with a minimum gap tolerance and provides visual signals, background pulses, and alerts when such stable conditions start.
Key Features
Uses 3 EMAs (50, 100, 200) from a selectable timeframe.
Checks if EMAs are aligned in a stable bullish or bearish order with configurable minimum percentage gaps.
Confirms that price is not touching the EMA50 (to avoid instability).
Displays arrow, text status ("Bull", "Bear", or "Unst" for unstable).
Shows a strength score representing the average EMA gap relative to tolerance.
Pulses the chart background green or red when stability starts.
Sends alerts when a new bullish or bearish stability condition begins.
Displays a table summary at the top center of the chart.
Inputs
Parameter Description Default Value
EMA TF Timeframe to fetch EMA values from. "15" (15 min)
Min Gap (%) Minimum % gap required between EMAs for stability. 0.1%
Background Opacity Opacity level (0-100) for the pulse background color. 85
How It Works
The indicator fetches EMA50, EMA100, and EMA200 values from the chosen timeframe.
It calculates the percentage gap between EMA50 & EMA100 and EMA100 & EMA200.
It checks if:
For bullish stability: EMA50 > EMA100 by at least the tolerance and EMA100 > EMA200 by at least tolerance, AND current candle’s low is above EMA50.
For bearish stability: EMA50 < EMA100 by at least the tolerance and EMA100 < EMA200 by at least tolerance, AND current candle’s high is below EMA50.
When a stable bullish or bearish condition starts (i.e., it was not stable the previous bar), it triggers a pulse on the background and sends an alert.
The strength score reflects how strong the EMA gaps are relative to the minimum gap set.
A table displays key info: stability arrow, status, strength percentage, and gap percentages.
Visuals on Chart
Arrow:
▲ = Bullish Stability
▼ = Bearish Stability
• = Unstable (no stability detected)
Status Text: "Bull", "Bear", or "Unst"
Background Pulse: Green for bullish stability start, red for bearish stability start (fades based on opacity setting).
Table at top center shows:
EMA stability arrow and status
Strength score (%)
Percentage gaps between EMAs 50-100 and 100-200
Alerts
The indicator sends alerts when a new stable bullish or bearish trend begins.
Alert messages include:
📈 Bullish Stability detected on $ ([timeframe])
📉 Bearish Stability detected on ([timeframe])
Alerts are triggered only once per bar close on the condition's start.
Recommended Usage Tips
Adjust EMA TF to your preferred higher timeframe for trend confirmation.
Set Min Gap (%) depending on how strict you want the gap between EMAs for stability (smaller gap = more sensitive).
Use Background Opacity to make pulses subtle or prominent according to your preference.
Combine this indicator with price action or other tools for entry/exit timing.
Use alerts to be notified instantly when stable trends form.
Overview
This indicator monitors the stability of the market trend by analyzing the relative positions and gaps between the 50, 100, and 200 EMAs (Exponential Moving Averages) on a user-defined higher timeframe. It detects when the EMAs align bullishly or bearishly with a minimum gap tolerance and provides visual signals, background pulses, and alerts when such stable conditions start.
Key Features
Uses 3 EMAs (50, 100, 200) from a selectable timeframe.
Checks if EMAs are aligned in a stable bullish or bearish order with configurable minimum percentage gaps.
Confirms that price is not touching the EMA50 (to avoid instability).
Displays arrow, text status ("Bull", "Bear", or "Unst" for unstable).
Shows a strength score representing the average EMA gap relative to tolerance.
Pulses the chart background green or red when stability starts.
Sends alerts when a new bullish or bearish stability condition begins.
Displays a table summary at the top center of the chart.
Inputs
Parameter Description Default Value
EMA TF Timeframe to fetch EMA values from. "15" (15 min)
Min Gap (%) Minimum % gap required between EMAs for stability. 0.1%
Background Opacity Opacity level (0-100) for the pulse background color. 85
How It Works
The indicator fetches EMA50, EMA100, and EMA200 values from the chosen timeframe.
It calculates the percentage gap between EMA50 & EMA100 and EMA100 & EMA200.
It checks if:
For bullish stability: EMA50 > EMA100 by at least the tolerance and EMA100 > EMA200 by at least tolerance, AND current candle’s low is above EMA50.
For bearish stability: EMA50 < EMA100 by at least the tolerance and EMA100 < EMA200 by at least tolerance, AND current candle’s high is below EMA50.
When a stable bullish or bearish condition starts (i.e., it was not stable the previous bar), it triggers a pulse on the background and sends an alert.
The strength score reflects how strong the EMA gaps are relative to the minimum gap set.
A table displays key info: stability arrow, status, strength percentage, and gap percentages.
Visuals on Chart
Arrow:
▲ = Bullish Stability
▼ = Bearish Stability
• = Unstable (no stability detected)
Status Text: "Bull", "Bear", or "Unst"
Background Pulse: Green for bullish stability start, red for bearish stability start (fades based on opacity setting).
Table at top center shows:
EMA stability arrow and status
Strength score (%)
Percentage gaps between EMAs 50-100 and 100-200
Alerts
The indicator sends alerts when a new stable bullish or bearish trend begins.
Alert messages include:
📈 Bullish Stability detected on $ ([timeframe])
📉 Bearish Stability detected on ([timeframe])
Alerts are triggered only once per bar close on the condition's start.
Recommended Usage Tips
Adjust EMA TF to your preferred higher timeframe for trend confirmation.
Set Min Gap (%) depending on how strict you want the gap between EMAs for stability (smaller gap = more sensitive).
Use Background Opacity to make pulses subtle or prominent according to your preference.
Combine this indicator with price action or other tools for entry/exit timing.
Use alerts to be notified instantly when stable trends form.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.