Introduction

An exponential moving average (EMA) is a type of moving average that places a greater weight and significance on the most recent data points.

An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average, which applies an equal weight to all observations in the period.

Indicator type

Trend

Formula

movav = prev * (1.0 – smoothfactor) + newdata * smoothfactor​                        where smoothfactor =1- 2 / (1 + period)

How to use:

The EMA is a moving average that places a greater weight and significance on the most recent data points. Like all moving averages, this technical indicator is used to produce buy and sell signals based on crossovers and divergences from the historical average. Traders often use several different EMA lengths, such as 10-day, 50-day, and 200-day moving averages.

EMAs are commonly used in conjunction with other indicators to confirm significant market moves and to gauge their validity. For traders who trade intraday and fast-moving markets, the EMA is more applicable

Bullish Scenario

  • When the price crosses above the exponential moving average, it indicates that the current price is greater than the average of the defined period, hence the market is in an upward trend.
  • When the shorter period moving average crosses over the longer time moving average, it indicates the start of a new uptrend.

Bearish Scenario

  • When the price crosses down the exponential moving average, it indicates that the current price is lower than the average of the defined period, hence the market is in a downward trend.
  • When the shorter period moving average crosses down the longer time moving average, it indicates the start of a new downtrend.

Building On Mudrex:

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do:

BUY: When price crosses up the EMA.

Compare Block for Buy Signal over Mudrex

SELL: When price crosses down the EMA.

Compare Block for Sell Signal over Mudrex

Final Strategy: The final strategy on Mudrex looks like this

EMA Trading Strategy over Mudrex

Testing

We can now run a quick back-test to see how our strategy performs.

Back-Test Results for EMA

Quick links