OPEN-SOURCE SCRIPT

Distance between EMA 50-100/100-150

This script calculates and plots the percentage difference between the 50-period, 100-period, and 150-period Exponential Moving Averages (EMA) on a TradingView chart. The aim is to provide a clear visual representation of the market's momentum by analyzing the distance between key EMAs over time.

Key features of this script:


1. EMA Calculation: The script computes the EMA values for 50, 100, and 150 periods and calculates the percentage difference between EMA 50 and 100, and between EMA 100 and 150.
2. Custom Threshold: Users can adjust a threshold percentage to highlight significant divergences between the EMAs. A default threshold is set to 0.1%.
3. Visual Alerts: When the percentage difference exceeds the threshold, a visual marker appears on the chart:
  • Green Circles for bullish momentum (positive divergence),
  • Red Circles for bearish momentum (negative divergence),
  • Diamonds to indicate the first occurrence of new bullish or bearish signals, allowing users to catch fresh market trends.

4. Dynamic Plotting: The script plots two lines representing the percentage difference for each EMA pair, offering a quick and intuitive way to monitor trends.

Ideal for traders looking to gauge market direction using the relationship between multiple EMAs, this script simplifies analysis by focusing on key moving average interactions.
distancedistance_between_moving_averageEMASOscillatorsTrend AnalysisVolatility

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal