EMA Trend Meter Indicator

EMA Trend Meter Indicator

EMA Trend Meter: An Essential Indicator for Trend Detection

Introduction

The “EMA Trend Meter” can be an interesting tool to identify the direction and strength of a financial asset’s trend. In this article, we will explain the indicator in detail, from its setup to its interpretation.

Fundamentals of the EMA Trend Meter

The “EMA Trend Meter” is based on the Exponential Moving Average (EMA), which is a more sensitive version of the moving average that gives more weight to recent data. This indicator uses four EMAs of different periods (1, 7, 14, and 21 days) to detect the direction of the trend and its strength. These periods, as well as the type of averages, are adjustable, as we will see now.

Setup and Parameters

The indicator consists of several adjustable parameters:

  • src: Defines the price source, usually the closing price.
  • p0, p1, p2, p3: Represent the periods of the EMAs, set at 1, 7, 14, and 21, respectively.
  • t0, t1, t2, t3: Types of moving averages, all initially set as exponential averages.
  • n: Period used for the calculation of the Rate of Change (ROC).
  • Additionally, parameters are incorporated to calculate the RSI and the Stochastic Oscillator, key elements to determine the strength of the trend.

Logic of the Indicator and Calculation

The EMAs are calculated on the selected price, adjusting the indicator’s sensitivity to price changes. The ROC of the EMAs offers a measure of the speed at which the trend changes. By combining the reading of the variation of the EMAs with that of the stochastic RSI, the “EMA Trend Meter” provides a comprehensive view of the direction and strength of trends.

Interpretation of the Indicator

The interpretation focuses on the color of the EMA lines and the relative position of the Stochastic K and D. EMAs that change to green indicate an uptrend, while red suggests a downtrend. A Stochastic K above D reinforces the buy signal, and vice versa for the sell signal.

Trading Alerts

The indicator generates buy alerts when more than one EMA turns green and the Stochastic K is above D. Similarly, sell alerts are generated under opposite conditions. This is a way of combining signals from different indicators.

Conclusion

The “EMA Trend Meter” can be a powerful tool for traders looking to capture and analyze market trends accurately. Its ability to combine multiple indicators on a single chart makes it indispensable for future trading strategies.

Indicator Code in ProBuilder

Below is the code for the indicator in the ProBuilder language, designed to be easily integrated into the ProRealTime platform:

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. groelandes • 347 days ago #

    Cuando te descargas el fichero itf, en su código no aparece toda la configuración de alertas ¿cómo puedo solucionar eso?

    • Iván • 345 days ago #

      Si lo descargas e importas en tu PRT verás que se han creado las variables para luego configurar el indicador. Estas variables son las líneas 8 a 21 del código.

  2. WhyAskOZ • 335 days ago #

    Hi, Ivan

    As always you are doing great coding. The code works on my PRT, however the issue i face is the colour of the lines particularly Stochastic lines which in your screenshot is Black & White. I use black background so i can’t see black line.

    I know all your code has pre-defined colours written inside but can we have colour selection menu ? similar to existing PRT indicator where we can select the colour by going into setting and then change to whatever we like?

    Nevertheless How do i change this black and white colour you applied in your code to green and red? and what line i need to change in the code?

    thanks

    • Iván • 334 days ago #

      You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,xx) and you will be able to configure after in a new window.
      You can also change color directly in code. Check lines after line 40.
      If you want change background color you can go to settings in the menu.

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
MaoRai54 Thanks, now it's OK. in your first code at line 15-16 it's missing.
Madrosat Hello Ivan Did you try a strategy with this indicator
Iván Hi. No I didn't. This is a code translation requested by an user a few days ago.
Iván
1 year ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
1 year ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
Iván
1 year ago
winnie37 Hi Ivan, if i want to use it, and call the oscillator value (in grey, green or red), how to...
Iván The oscillator is smoothtype. In inputs there is de lag to configure the output
ARLEQUIN49 Hello Ivan, Would it be possible to convert the code of this QQE MOD indicator which accomp...
ARLEQUIN49 here is the code: //@version=4 //By Glaz, Modified // study("QQE MOD") RSI_Period = i...
Iván Hi, Yes I can translate it but please, create a new topic for it.
Fgats quelques explications en Français ici : Some explanations in French here : https://www.p...
Nicolas Merci pour cette contribution, j'apprécie ! :)
Fgats Merci Nicolas pour ces encouragements et merci aussi pour le commentaire en Anglais accompa...
Alai-n I really like it when you develop ideas around price movement! I am much less a fan of all t...
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
Nicolas
2 years ago
B-Xtrender
B-Xtrender
8
Indicators
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...
JS
2 years ago
Trendilo
Trendilo
1
Indicators
Coded1 very interesting indicator, thanks JS
Nicolas
2 years ago
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
manfeber Buenos dias,alguien me podria decir como se descargar el archivo o el indicador Q-Trend??,ya...
BriceE Bonjour Nicolas, Je suis a la recherche d'indicateurs pour me donner la meilleure indicatio...
Nicolas
2 years ago
Maxime Baudin Well done Nicolas, creative!
Stenozar Hi Nicolas, please can you explain how to read/use this indicator? thanks!
JC_Bywan For people interested in the screener: https://www.prorealcode.com/topic/screener-buy-sell-m...
octum Gracias NJicolas. Las lineas 35 y 36 dan fallo. (¿Es adrede para iniciados?) Puedes co...
mortezaali14 Salut Nicholas, comment exécuter ce fichier dans les métadonnées
Nicolas Yes, Magic if the variable that contains the value of the line, you can test if it goes up o...
dadah1987 Bonjour Nicolas, merci pour cet indicateur. Utilisant pour l'instant la création simplifié p...
Nicolas Merci d'ouvrir un sujet sur le forum avec une description complète du système.
GustavoLoboOrenstein Is it possible to add histogram with only increasing bars?
YvesRobert Bonjour Nicolas, en effet ca marche, je me suis trompé, j'ai bien tout le tracé. C'est parce...
oliTR Bonjour, les conditions longCond et shortCond ne contiennent-elles pas une condition qui s'a...
xpe74 Utilitaire vraiment top, d'autant qu'ajouter des filtres de seuil peux aider a limiter le no...

Top